home *** CD-ROM | disk | FTP | other *** search
/ STraTOS 1997 April & May / STraTOS 1 - 1997 April & May.iso / CD01 / INTERNET / SITES / RAND / MGIFV5.STG < prev    next >
Encoding:
Text File  |  1997-02-06  |  106.1 KB  |  2,767 lines

  1. @options "-i -s +zz"
  2. @author "Johan Klockars"
  3. @database "MGIF 5.10"
  4. @subject "MGIF v5"
  5. @$VER: MGIFv5.hyp 1.02 (960710)
  6.  
  7. @node "Top" "MGIF 5.10 manual (root)"
  8. @image "logo.img" 22
  9.  
  10.      @{B}Welcome to the                   5.10 manual@{0}
  11.      Copyright 1996                   Johan Klockars
  12.  
  13.      Getting started                  The Graphical User Interface
  14.      General overview                 The text interface
  15.      MGIF startup                     Frequently Asked Questions
  16.      MGIF menus                       Algorithms
  17.      File handling                    Literature
  18.      Display handling
  19.      Using MGIF                       Distribution
  20.      Configuration                    Registration
  21.      Tutorials                        Bug report form
  22.      Definitions                      Questionary
  23.  
  24.                           What's new?
  25.                             Authors
  26.                          Special thanks
  27.                            The future
  28.  
  29.                All use of MGIF is at your own risk.
  30.  
  31.           This manual is still being extended and revised.
  32.                   All comments are very welcome.
  33.  
  34. @endnode
  35. @node "Getting started"
  36.  
  37. @{B}Getting started@{b}
  38. Running MGIF as a GEM program requires the program to have an extension
  39. of .PRG or .GTP (for newer TOS versions). For now don't worry about if
  40. there are any differences between those two.
  41.  
  42. - Change to the directory where you unpacked the MGIF archive.
  43. - If your computer does not recognize .GTP as a program extension (the
  44.   MGIF_5.GTP icon is of document type rather than program type), rename
  45.   the program file from MGIF_5.GTP to MGIF_5.PRG.
  46. - Double click MGIF_5.GTP/PRG.
  47. - If MGIF is still a .GTP program, push the 'OK' button or press enter
  48.   in the dialog that appears.
  49.  
  50. After a short while MGIF is up and running and presents you with its
  51. startup dialog. For the time being, just click the 'OK' button or press
  52. enter here.
  53. MGIF will now present its @{"menu" LINK "MGIF menus"} line.
  54.  
  55. @{"Load" link "File menu" "Load file"} under the File heading in the 'File' menu will give you the
  56. normal file selector, which can be used to find the image file you want
  57. to load.
  58.  
  59. If you have done everything as described above, the image you select
  60. will be loaded, converted to greyscales and drawn on the screen.
  61.  
  62. If the image was not drawn automatically, you must have done something
  63. to cause MGIF to load the wrong (or no) options file. In that case,
  64. select @{"Source" link "Image menu" "Draw source"} under the Draw heading in the 'Buffers' menu to tell MGIF
  65. to display the image.
  66.  
  67. Press the left mouse button once or twice to return to the menu.
  68.  
  69. Now, try some of the image processing operations in the menu.
  70. Documentation can be found under 'MGIF menus' in the ST-guide manual.
  71.  
  72. One thing to note about the image processing operations is that they
  73. operate on a source and give a destination image. There are two
  74. separate draw selections in the menu that show either of the images.
  75. You can make source and destination the same by changing the setup in
  76. the 'Buffers' menu.
  77.  
  78. @endnode
  79. @node "General overview"
  80.  
  81. @{B}General overview@{0}
  82.  
  83. History
  84. Ideas
  85. Differences from other image viewers/processors
  86.  
  87. @{"What's new in MGIF v5.01?" link "What's new?"}
  88.  
  89. @{B}Major changes since pre-v5 MGIF@{0}
  90. MGIF v5 is by far the most extensive update yet (and hopefully ever)
  91. of the program. Some of the image processing and low level stuff is
  92. about all that is left internally of the previous versions.
  93.  
  94. The most obvious new feature is of course the GEM interface, but even if
  95. that took quite a long time to put together, it's a very small part of
  96. the new code.
  97. Handling of images in mapped and 24 bit colour is in my opinion the most
  98. important improvement, coupled with the ability to show these images
  99. with good quality, at least on the more advanced Atari computers.
  100. Other changes include GIF/Targa/PPM save and scrollable image view.
  101. One of the latest additions, 8 bit colour VDI support, is also quite
  102. significant, since it's a first step towards a completely GEMified MGIF.
  103.  
  104. For a complete, but not very readable, account of the changes to MGIF
  105. from the beginning of time, refer to the enclosed file 'HISTORY.TXT'.
  106.  
  107. @endnode
  108. @node "History"
  109.  
  110.                            @{B}History@{0}
  111.  
  112. William Rosenkranz
  113. The text below was given in answer to an email I (Johan) sent.
  114. Any incoherency is due entirely to my editing.
  115.  
  116. I Initially wrote MGIF for the following reasons:
  117.  
  118.         - I was interested in learning about F-S dithering
  119.         - I was also interested in image processing techniques
  120.         - I was starting to collect .gif images and had no way to
  121.           view them on a monochrome monitor (which is normally
  122.           what I use, though I also had/have a color monitor)
  123.         - It seemed like an interesting project as diversion and
  124.           had a practical result
  125.  
  126. I forget when it all started. It should be burried in the source code.
  127. probably about 1990 or so. [Version 1.0 was released in December 1990]
  128.  
  129. The key was the screen switching scheme (flicker). I forget where I got
  130. that, but I cited the developer of the technique (also in the source).
  131. [The originator was Klaus Pedersen, unfortunately unavailable per email]
  132. Once I had that working, I had a crude .gif viewer. After that, it was a
  133. relatively simple matter to add some basic image processing techniques
  134. and expand the program to also read .pi* images. I stopped development
  135. when I was personally satisfied that I had a reasonably complete system
  136. for whatever needs I might have. I think the code was designed with
  137. enough flexibility to expand (which is clearly proven by your efforts).
  138.  
  139. I suppose the main thing was simplicity. That and I could not get the
  140. flicker thing working well enough in a GEM window (ie, without line-A).
  141. A full GUI would have been nice, and I had some slick things like pop-up
  142. menus that I had developed earlier to plug in. But it never panned out
  143. for me. I would probably say that MGIF under my tenure was pretty much a
  144. hack, though I think I designed it and commented it well enough for
  145. continued development. I.e., it was pretty modular and easy to add
  146. functionality (image processing, new file formats, etc.).
  147.  
  148.  
  149. Johan Klockars
  150. My involvement in the MGIF project was quite unintentional from the
  151. beginning. I'd liked the program very much since it first appeared on
  152. the internet, but I thought it was a bit too slow. Since the sources
  153. were available, I set about making them compatible with GNU C, which was
  154. then, and still is, the very best C compiler that runs on an Atari (and
  155. just about everything else).
  156. Along the way I cleaned up the memory handling a bit and rewrote the
  157. GIF decoder, and suddenly I had a @{B}much@{0} faster MGIF. Hurray!
  158.  
  159. Some time later there was a discussion of various compilers on the
  160. Usenet atari group. The TurboC compiler was claimed by several people
  161. to be the best, which I could not believe. To prove my point I ported
  162. MGIF version 3.5 to TurboC (very simple then since it was all text
  163. based) and posted a comparison of the original MGIF, compiled by
  164. Sozobon C, and my slightly modified version compiled by GNU C and
  165. TurboC. The results showed quite clearly that GNU C was/is a much
  166. better compiler than TurboC, but it also became clear that quite a few
  167. people liked MGIF as much as I did and wanted to have the new, faster,
  168. version. A short discussion with Bill ended with me taking over the
  169. development.
  170.  
  171. What happened after that, you can see for yourself.
  172.  
  173. @endnode
  174. @node "Ideas"
  175.  
  176.                @{B}Some of the ideas behind MGIF@{0}
  177.  
  178. @{B}Image processing@{0}
  179. From the very beginning, MGIF has had its emphasis towards image
  180. processing, rather than the usual image display functionality. One of
  181. the more obvious artifacts of this is the relatively small number of
  182. image file formats supported.
  183.  
  184. The source/destination concept is convenient for image processing, but
  185. it can be extremely wasteful for viewing only purposes. It is possible
  186. to use MGIF with a single image buffer, but then there will be some
  187. restrictions.
  188.  
  189.  
  190. @{B}Flicker for greyscales@{0}
  191. As William Rosenkranz says in his part of the 'History' section, one of
  192. the important reasons behind the first versions of MGIF was that there
  193. was no way to view GIF images in any reasonable quality on a monochrome
  194. Atari monitor. He, as well as many others, liked the paper whiteness and
  195. the high resolution, but still wanted to look at pictures sometimes.
  196.  
  197. The idea of flickering several, specially drawn, images to give an
  198. appearence of greyscales (by Klaus Pedersen), worked very well and has
  199. been a corner stone of MGIF ever since.
  200.  
  201.  
  202. FreeWare
  203. This text got quite long and was put on a page of its own for easier
  204. multiple access. Just click on the title above to read it.
  205. It's perhaps a bit philosophical, but I'd appreciate if you read it.
  206. It won't take very long and it discusses a few points I feel quite
  207. strongly about.
  208.  
  209. @endnode
  210. @node "Differences"
  211.  
  212. @{B}How MGIF differs from some other software@{0}
  213.  
  214. It might be useful to give a short overview of how MGIF differs from the
  215. more common (right now ;-) image processing/viewing programs, such as
  216. 'GEMView' and 'Speed of Light'.
  217.  
  218. @{B}Positive@{0}
  219. - MGIF is free!
  220.   Not only without cost, but you can also get hold of the complete
  221.   source code for use in your own FreeWare (or similar) programs.
  222. - MGIF is fast.
  223.   For many things MGIF is a lot faster than 'GEMView' and 'Speed of
  224.   Light'. GIF loading and drawing are two major things.
  225.   To be fair, there are things that MGIF is quite a bit slower at than
  226.   for example 'Speed of Light'. JPEG loading is one thing.
  227. - MGIF is better suited to image processing.
  228.   I know that some people (no names) have other opinions on this, but
  229.   my main reason for saying this is:
  230.     MGIF can store images internally in a format that means that no
  231.     information is lost. If a 24 bit image is converted to 256 colours
  232.     on loading, you can lose a @{B}lot@{0} of information.
  233.  
  234.  
  235. @{B}Negative@{0}
  236. - MGIFv5 will not work (see below) on any 16/24 bit graphics card.
  237.   Neither will 'Speed of Light', but 'GEMView' is very good at it.
  238.   (The new -vdi switch may work, but I have no way of testing it.)
  239. - MGIF uses no tricks to get better colour display
  240.   'Speed of Light' has its flickering, which can be quite good in a
  241.   16 colour mode and then there are programs like 'PhotoChrome' that
  242.   changes @{"palette" link "Palette"} on the fly, giving marvelous output on a simple ST.
  243.  
  244. @endnode
  245. @node "FreeWare"
  246.  
  247.                           @{B}FreeWare@{0}
  248.  
  249. @{B}Programming for fun@{0}
  250. A very important reason for writing FreeWare programs is in my opinion
  251. that you can do it only because it's fun. There are never any paying
  252. users to consider when you decide on what to implement and when (if
  253. ever) to release new versions.
  254.  
  255. The amount of work that I've put into making MGIF what it is today, and
  256. on top of that the work of William Rosenkranz before me and a couple of
  257. other people along the way, could never be repayed by ShareWare fees.
  258. I myself for example have certainly worked more than half a year full
  259. time on this program (and I usually work very fast ;-).
  260.  
  261. But why not even try?
  262. Well, I'm in no way one of those 'Information wants to be free!' guys.
  263. In fact I despise all that cyberspace nonsense.
  264. My first contact with the internet and especially Usenet made a great
  265. impression on me, though, with all these talented people sharing their
  266. software as well as their knowledge and time.
  267. The Free Software Foundation behind GNU C, C++, Emacs etc etc and many
  268. many others, really do a lot to forward the field of computing.
  269.  
  270. MGIF and the rest of the software I've written is just my small
  271. contribution. A simple 'thanks' to the internet/Usenet society.
  272. Likely nothing I ever write will have any major impact, but at least I
  273. can feel that I did what I could, and it was great fun!
  274.  
  275.  
  276. @{B}Joint development@{0}
  277. A very nice thing about programming FreeWare software is that it's much
  278. easier to get other people involved in it. No money is being made, so
  279. everyone can contribute however much or little they like.
  280. Over the years, I've worked together on parts of the program with two
  281. or three other people and it has worked quite well, even if they lived
  282. in Germany or Finland.
  283. If you feel you'd like to get involved, please send an @{"email" link "Johan Klockars" "email"}.  :-)
  284.  
  285.  
  286. @{B}Source code availability@{0}
  287. While any FreeWare software is nice, it's in my opinion when it's free
  288. to the degree that anyone can pick up the work and go on that the idea
  289. really shines. I'm sure you have used software that has not been
  290. supported for years and thought of lots of improvements that would be
  291. @{B}so@{0} great to have. If the sources were available you could add those
  292. things (or persuade someone else to do them, more frequently)!
  293. This will never happen to commercial software and is also very unlikely
  294. with regards to ShareWare.
  295.  
  296. It's my hope that more FreeWare authors on the Atari computers give away
  297. their sources in the future. The wheel certainly has been reinvented
  298. enough times by now.
  299. If you retain your copyrights and give an 'eternally' valid contact
  300. address of some kind (or simply state very clearly in the documentation
  301. what your terms are for using the code) there should be no problem.
  302.  
  303. @endnode
  304. @node "MGIF startup"
  305.  
  306. @{B}MGIF startup@{0}
  307.  
  308.   Program modes
  309.   The startup dialog
  310.   Command line switches (also in file/environment and internal to MGIF).
  311.  
  312. @endnode
  313. @node "Program modes"
  314.  
  315. @{B}Program modes@{0}
  316. To take full advantage of MGIFv5 it should really be run as a GEM
  317. program, but it is also possible to run in a totally text based
  318. mode, for example if you are running MiNT with a shell.
  319.  
  320. Installing MGIFv5 as an application for certain file types works fine,
  321. as does dragging image files onto the MGIF program icon in desktops with
  322. support for that.
  323.  
  324. Normally when MGIF is run as a GEM program, a startup dialog will appear
  325. where you can decide how you want MGIF to use its memory.
  326.  
  327. @endnode
  328. @node "MGIF menus"
  329.  
  330.         @{B}MGIF 5.00 menus & dialogs and their explanations@{0}
  331.  
  332.  Desk  @{"File" link "File ms"}  @{"Image" link "Image ms"}  @{"Buffers" link "Buffers ms"}  @{"Frame" link "Frame ms"}  @{"Point" link "Point ms"}  @{"Area" link "Area ms"}  @{"Options" link "Options ms"}
  333.  
  334. @endnode
  335. @node "File ms" "File menu selections"
  336.  
  337. @{B}File@{0}
  338.  -- Image --
  339.   @{"Load" link "File menu" "Load file"}
  340.   @{"Save" link "File menu" "Save file"}
  341.  - @{"Palette" ignore} -
  342.   @{"Load" link "File menu" "Load palette"}
  343.   @{"Save" link "File menu" "Save palette"}
  344.  -- Conf. --
  345.   @{"Write" link "File menu" "Write configuration"}
  346.  --- Bye ---
  347.   @{"Quit" link "File menu" "Quit"}
  348.  
  349. @endnode
  350. @node "Image ms" "Image menu selections"
  351.  
  352. @{B}Image@{0}
  353.  ---- Draw -----
  354.   @{"Source" link "Image menu" "Draw source"}
  355.   @{"Destination" link "Image menu" "Draw destination"}
  356.  ---- Show -----
  357.   @{"Drawn pic" link "Image menu" "Show drawn"}
  358.   @{"Info" link "Image menu" "Information"}
  359.  --- 24 bit ----
  360.   @{"Quantize" link "Image menu" "Quantize"}
  361.   @{"Draw RGB" link "Image menu" "Draw RGB"}
  362.  - Destination -
  363.   @{"UNDO" link "Image menu" "Undo"}
  364.   @{"Copy (save)" link "Image menu" "Copy"}
  365.   @{"Paste(load)" link "Image menu" "Paste"}
  366.  
  367. @endnode
  368. @node "Buffers ms" "Buffers menu selections"
  369.  
  370. @{B}Buffer@{0}
  371.  ----- Copy -----
  372.   @{"Dest -> src" link "Buffers menu" "Dest to src"}
  373.   @{"Src  -> dest" link "Buffers menu" "Src to dest"}
  374.  -- Operations --
  375.   @{"Combine..." link "Buffers menu" "Combine"}
  376.   @{"Change type" link "Buffers menu" "Change type"}
  377.  ---- Source ----
  378.   @{"Buffer 0" link "Buffers menu" "Source select"}
  379.   @{"Buffer 1" link "Buffers menu" "Source select"}
  380.   @{"Buffer 2" link "Buffers menu" "Source select"}
  381.   @{"Buffer 3" link "Buffers menu" "Source select"}
  382.  - Destination --
  383.   @{"Buffer 0" link "Buffers menu" "Destination select"}
  384.   @{"Buffer 1" link "Buffers menu" "Destination select"}
  385.   @{"Buffer 2" link "Buffers menu" "Destination select"}
  386.   @{"Buffer 3" link "Buffers menu" "Destination select"}
  387.  - Create test --
  388.   @{"Linear shade" link "Buffers menu" "Linear shade"}
  389.  
  390. @endnode
  391. @node "Frame ms" "Frame menu selections"
  392.  
  393. @{B}Frame@{0}
  394.  --- Mirror ---
  395.   @{"Vertical" link "Frame menu" "Mirror"}
  396.   @{"Horizontal" link "Frame menu" "Mirror"}
  397.  ---- Misc ----
  398.   @{"Scale..." link "Frame menu" "Scale"}
  399.   @{"Zoom" link "Frame menu" "Zoom"}
  400.   @{"Cut" link "Frame menu" "Cut"}
  401.   @{"Rotate" link "Frame menu" "Rotate"}
  402.   @{"Border..." link "Frame menu" "Border"}
  403.  
  404. @endnode
  405. @node "Point ms" "Point menu selections"
  406.  
  407. @{B}Point@{0}
  408.   @{"Hist. equal." link "Point menu" "Hist equal"}
  409.   @{"Inversion" link "Point menu" "Inversion"}
  410.   @{"Log scale" link "Point menu" "Log scale"}
  411.   @{"Threshold" link "Point menu" "Threshold"}
  412.   @{"Contr. expan." link "Point menu" "Contr expan"}
  413.   @{"Brighten" link "Point menu" "Brighten"}
  414.   @{"Darken" link "Point menu" "Darken"}
  415.   @{"Gamma corr." link "Point menu" "Gamma corr"}
  416.  
  417. @endnode
  418. @node "Area ms" "Area menu selections"
  419.  
  420. @{B}Area@{0}
  421.  ----- Linear ------
  422.   @{"Convolutions..." link "Area menu" "Convolution"}
  423.   @{"Blur" link "Area menu" "Blur"}
  424.  --- Non-linear ----
  425.   @{"Lmax" link "Area menu" "Lmax"}
  426.   @{"Lmin" link "Area menu" "Lmin"}
  427.   @{"Median" link "Area menu" "Median"}
  428.   @{"Oil" link "Area menu" "Oil"}
  429.   @{"Pixelize" link "Area menu" "Pixelize"}
  430.  
  431. @endnode
  432. @node "Options ms" "Options menu selections"
  433.  
  434. @{B}Options@{0}
  435.   @{"Load..." link "Options menu" "Load"}
  436.   @{"Display..." link "Options menu" "Display"}
  437.   @{"F-S..." link "Options menu" "F-S"}
  438.   @{"Quantize..." link "Options menu" "Quantize"}
  439.   @{"Misc..." link "Options menu" "Misc"}
  440.  -- ST-Guide ---
  441.   @{"Help" link "Options menu" "Help"}
  442.  
  443. @endnode
  444. @node "The startup dialog"
  445.  
  446. @{B}The startup dialog@{0}
  447. When MGIF is started as a GEM program it will display a dialog (unless
  448. told not to by the @{"-dsu switch" link "Command line switches" "interface options"} that looks somewhat like:
  449.  
  450.                 -------------------------------
  451.                 |  Max memory used:  1234 Kb  |
  452.                 |                             |
  453.                 |   Use alternate / ST ram    |
  454.                 |                             |
  455.                 |    Flicker mode     24 bit  |
  456.                 |                             |
  457.                 |  Single:   buffer   screen  |
  458.                 -------------------------------
  459.  
  460. Here you can tell MGIF the amount of memory to use, where to allocate it
  461. and how to use it. The number given as maximum should not be increased,
  462. but can be decreased at will. The texts in single outlines are used as
  463. switch buttons. They are selected when black and will invert if clicked.
  464.  
  465. Flicker mode:   Allocate memory for three screens to enable
  466.                 flickering (mono).
  467. 24 bit:         Use three buffers for images -> 24 bit processing
  468.                 possible.
  469. Single buffer:  Do not allocate memory for a destination buffer.
  470.                 Source buffer is used as destination too.
  471.        screen:  Use normal system screen for image display.
  472.  
  473.  
  474. @{B}Hints on setup@{0}
  475. Don't select flicker mode unless you really want it. In a colour mode on
  476. a TT or Falcon030 it can use up large amounts of memory.
  477.  
  478. Some image manipulations need more than one buffer, for example
  479. rotation.
  480.  
  481. Single screen can save quite a lot of memory, particularly on a Falcon
  482. in high resolution colour modes.
  483.  
  484. If you select both single buffer and single screen you'll have the
  485. largest possible buffer area, but you won't be able to load JPEGs.
  486. I will try to fix this for greyscale and 24 bit load (950726).
  487.  
  488. @endnode
  489. @node "File menu"
  490.  
  491. @label "Load file"
  492. @{B}Load file@{0}
  493. MGIF will present the normal file selector, giving as default directory
  494. and file type that of the most recently loaded file.
  495.  
  496. Once a file has been selected MGIF will try to load and decode it into
  497. the first buffer (or buffers if in RGB mode). At present MGIF only looks
  498. to the file extension to decide what format is used, so if a file is
  499. refused it may be simply because it has been given an erroneous
  500. extension. While that is not common with image files from the internet
  501. or BBSes, it does happen.
  502.  
  503. For more information on what image types can be loaded, load modes
  504. and options etc, go to the 'Loading' section.
  505.  
  506. @line 5 64 0
  507.  
  508. @label "Save file"
  509. @{B}Save file@{0}
  510. This is used to save the image in the first buffer (or buffers if it's
  511. an RGB picture).
  512. Before you can give a file name, MGIF wants to know in what format
  513. you want to save the file. It therefore presents a dialog box with
  514. a popup menu for file types and some greyed out options. For now only
  515. the popup menu and source/destination selection is implemented.
  516. For most of the file types no extra information will be required, but
  517. the IMG save will give an extra dialog.
  518.  
  519. When everything is set up, the normal file selector will be presented
  520. and you can give whatever file name you wish.
  521.  
  522. For more information on file types etc, see 'Saving'.
  523.  
  524. @line 5 64 0
  525.  
  526. @label "Load palette"
  527. @{B}Load palette@{0}
  528. MGIF will load the palette file, *.PAL, that you chose using the
  529. normal file selector, and use the colour definitions from it for the
  530. destination buffer.
  531.  
  532. @line 5 64 0
  533.  
  534. @label "Save palette"
  535. @{B}Save palette@{0}
  536. MGIF will save the palette of the source buffer to the palette file,
  537. *.PAL, that you chose using the normal file selector.
  538.  
  539. @line 5 64 0
  540.  
  541. @label "Write configuration"
  542. @{B}Write configuration@{0}
  543. This allows you to write a configuration permanently into the MGIF
  544. executable file.
  545. You can't do this for the currently set configuration, but rather an
  546. options file will be loaded and used.
  547.  
  548. The normal file selector will be presented twice. First to select the
  549. options file, normally MGIF.OPT, and then to select the MGIF program
  550. file itself.
  551.  
  552. There is a limited amount of space reserved for options in the MGIF
  553. executable, but since all comments are automatically stripped out
  554. this is not likely to be a problem.
  555.  
  556. @line 5 64 0
  557.  
  558. @label "Quit"
  559. @{B}Quit MGIF@{0}
  560. This will decompress the ROM in your machine as if it was a JPEG file
  561. and display it automatically on the screen. The resulting image depends
  562. on the TOS version, but is usually one model of Lamborghini or another.
  563. On a Falcon with TOS 4.01 as mine, it's a white '82 Countach LP400S!
  564.  
  565. Uh, or perhaps not...   ;-)
  566.  
  567. @endnode
  568. @node "IMG save"
  569.  
  570. @{B}Save in monochrome IMG format@{0}
  571. MGIF will present a second dialog before you select the file name if
  572. you got for the IMG save. Here you can select the precise size you
  573. want for the image. Either in pixels or in cm/inches, though the
  574. latter requires that you set the DPI correctly for your printer.
  575. The image will be written to a file while it's being created, so the
  576. size of your memory is no hindrance.
  577.  
  578. This is mainly intended for saving images to be included into word
  579. processors or DTP programs for printing, which means that the normal
  580. Floyd-Steinberg dithering used to great effect on the screen is not very
  581. useful. For details on why, see 'Halftone'.
  582.  
  583. If the 'F-S dithering' switch is selected, MGIF will F-S dither the
  584. image in monochrome while saving, using the parameters set in the 
  585. '@{"Options/F-S" link "Options menu" "F-S"}' dialog.
  586. Normally the current dither matrix will be used instead.
  587.  
  588. @endnode
  589. @node "Loading"
  590.  
  591. @{B}Loading files@{0}
  592. MGIF can load images stored in the following file formats:
  593.  
  594. Type    Extensions     Comment
  595. GIF     GIF            Both GIF87 and GIF89 can be loaded.
  596. JPEG    JPG, JPE       The files must be of the JFIF type. Most are.
  597. Targa   TGA
  598. PPM     PPM
  599. AIM     AIM            Format used by program Atari Image Manager.
  600. PI?     PI1, PI2       Atari Degas paintprogram format (unpacked).
  601. FL      FL             MGIF's flicker file format.
  602. (X)IMG  IMG            The normal GEM image format in colour or mono.
  603.  
  604. There is also a special internal format which can be used for temporary
  605. image backups while doing extensive manipulations. MGIF can also load
  606. dither and palette files.
  607.  
  608. An image is not necessarily loaded only into the source buffer.
  609.  
  610. - If the 'No grey' option in 'Misc...' is not selected, a greyscale
  611.   version is put in the destination buffer.
  612. - Loading of some file types, such as JPEG, requires so much temporary
  613.   storage that the destination buffer and extra screen will be
  614.   destroyed.
  615.  
  616. If you use 24 bit mode, you have three source buffers.
  617.  
  618.  
  619. @{B}Errors while loading@{0}
  620. A number of errors can occur during a load, especially if you're loading
  621. a JPEG, but for the time being they are all reported with the same
  622. dialog.
  623.  
  624. Out of buffer space   -  The image was too large for the buffers.
  625. Out of virtual memory -  When loading JPEGs, MGIF will use the
  626.                          destination buffer and extra screen (if
  627.                          available) for some temporary information.
  628.                          If this space is not enough it'll create a
  629.                          temporary file in a directory named by the
  630.                          environment variable TMP or TEMP.
  631.                          The temporary file can be quite large.
  632. Unknown file type      - The file didn't have a recognized extension.
  633. Bad file               - The extension was incorrect.
  634. File read error        - Bad data or end of file detected.
  635.  
  636. @endnode
  637. @node "Saving"
  638.  
  639. @{B}Saving files@{0}
  640. Images can be saved in the GIF, IMG, Targa, PPM and flicker formats.
  641. When you're manipulating images it can be useful to save and later
  642. restore your destination buffer. This can be accomplished by using the
  643. '@{"Copy (save)" link "Image menu" "Copy"}' and '@{"Paste(load)" link "Image menu" "Paste"}' functions in the file menu respectively. The
  644. saving can also be done automatically, see '@{"UNDO enable" link "Options menu" "Misc"}'.
  645. Copy/paste/undo is done in an internal, uncompressed, format. In 24 bit
  646. mode all the source buffers (3) are saved.
  647.  
  648.  
  649. @{B}Errors while writing@{0}
  650. A number of errors can occur during a write, but for the time being they
  651. are all reported with the same dialog.
  652.  
  653. Out of virtual memory -  When loading JPEGs, MGIF will use the
  654.                          destination buffer and extra screen (if
  655.                          available) for some temporary information.
  656.                          If this space is not enough it'll create a
  657.                          temporary file in a directory named by the
  658.                          environment variable TMP or TEMP.
  659.                          The temporary file can be quite large.
  660. File write error      -  Write error or disk full detected.
  661.  
  662. @endnode
  663. @node "Image menu"
  664.  
  665. @label "Draw source"
  666. @{B}Draw source buffer@{0}
  667. Draw image in the source buffer onto the screen. Options selected in the
  668. display and dither dialogs affect how the image is drawn.
  669.  
  670. @line 5 64 0
  671.  
  672. @label "Draw destination"
  673. @{B}Draw destination buffer@{0}
  674. Draw image in the source buffer onto the screen. Options selected in the
  675. display and dither dialogs affect how the image is drawn.
  676.  
  677. @line 5 64 0
  678.  
  679. @label "Show drawn"
  680. @{B}Show drawn picture@{0}
  681. Show the previously drawn image.
  682. This is not possible unless there are two screens, which is not the
  683. case if the single screen option in the startup dialog was selected.
  684.  
  685. @line 5 64 0
  686.  
  687. @label "Information"
  688. @{B}Buffer information@{0}
  689. Use 'Buffer info' to get information on the sizes and types of images in
  690. the buffers as well as the sizes of the buffers themselves.
  691.  
  692. @line 5 64 0
  693.  
  694. @label "Quantize"
  695. @{B}Colour quantize@{0}
  696. When an image has been loaded in, or converted to, 24 bit mode, it's
  697. possible create a mapped picture by reducing the number of colours.
  698. This can be done using 'quantize' with astounding results.
  699.  
  700. The number of colours to use and some operational parameters can be set
  701. in the '@{"Options/quantize" link "Options menu" "Quantize"}' dialog.
  702. If zero is chosen as the number of colours, MGIF will use whatever the
  703. current screen mode is capable of.
  704.  
  705. The destination buffer currently @{B}must@{0} be buffer 0.
  706.  
  707. @line 5 64 0
  708.  
  709. @label "Draw RGB"
  710. @{B}Draw RGB@{0}
  711. If the first three buffers are of type Red, Green and Blue respectively,
  712. for example after having loaded an image in 24 bit mode, you can draw
  713. the image in full colour using 'Draw RGB'.
  714. If you're not in Falcon TC mode, the image will be displayed using an
  715. ordered dither.
  716. In Falcon TC, the image will first be drawn quickly and then improved
  717. using Floyd-Steinberg error diffusion dithering for each of the RGB
  718. components.
  719.  
  720. @line 5 64 0
  721.  
  722. @label "Undo"
  723. @{B}Undo operation@{0}
  724. MGIF will reload the latest auto-saved destination buffer image.
  725. This is not selectable unless the undo functionality has been enabled
  726. from the '@{"Options/Misc" link "Options menu" "Misc"}' dialog.
  727.  
  728. @line 5 64 0
  729.  
  730. @label "Copy"
  731. @{B}Copy (save)@{b}
  732. Dumps the destination buffer contents into a file.
  733. Can be used for backing up intermediate image manipulation results or
  734. to help in complex operations.
  735.  
  736. @line 5 64 0
  737.  
  738. @label "Paste"
  739. @{B}Paste (load)@{b}
  740. Loads the previously @{"copied" link "Image menu" "Copy"} buffer into the destination buffer.
  741.  
  742. @endnode
  743. @node "Buffers menu"
  744.  
  745. @label "Dest to src"
  746. @{B}Copy dest -> src@{0}
  747. Copy image from the destination to the source buffer.
  748. The image type is not copied.
  749.  
  750. @line 5 64 0
  751.  
  752. @label "Src to dest"
  753. @{B}Copy src -> dest@{0}
  754. Copy image from the source to the destination buffer.
  755. The image type is not copied.
  756.  
  757. @line 5 64 0
  758.  
  759. @label "Combine"
  760. @{B}Combine source and destination images@{0}
  761. A wide range of effects that can be produced with some creative use of
  762. this. Apart from the obvious image blending, you can for example do
  763. @{"unsharp masking enhancement" link "Unsharp masking"} (together with filter operations), binary
  764. and diffuse masking and shading.
  765.  
  766. A dialog is displayed where you can select for both source and dest
  767. - if they are to be involved at all
  768. - if they should be negated
  769. - what factor to multiply them by
  770.  
  771. You can also select
  772. - what divisor to apply to the source/destination sum before storing
  773. - if source and destination should be multiplied rather than added
  774. - if a constant should be added to the source/destination sum/product
  775.   (after the division)
  776. - if the result should be clipped to the 0-255 interval
  777.   (recommended for normal use)
  778.  
  779. With this dialog it is possible to set up calculations such as:
  780.    dest = source / 2
  781.    dest = source * 10 - dest * 9
  782.    dest = (source * 2 + dest * 3) / 5
  783.    dest = -source * 17 / 23 - dest * 111 / 17 + 128
  784.    dest = (source * dest) / 255
  785.  
  786. @line 5 64 0
  787.  
  788. @label "Change type"
  789. @{B}Change buffer type@{0}
  790. A dialog box will be presented where you can select what type you want
  791. to change to. The source image will be converted and the result put in
  792. the destination buffer.
  793.  
  794. @line 5 64 0
  795.  
  796. @label "Source select"
  797. @{B}Source buffer selection@{0}
  798. Select which buffer is to be used as the source for image processing
  799. operations. The current selection checked.
  800.  
  801. @line 5 64 0
  802.  
  803. @label "Destination select"
  804. @{B}Destination buffer selection@{0}
  805. Select which buffer is to be used as the destination for image
  806. processing operations. The current selection checked.
  807.  
  808. @line 5 64 0
  809.  
  810. @label "Linear shade"
  811. @{B}Create a test image@{0}
  812. The image in the source buffer is replaced by a vertical linear shading
  813. and the one in the destination buffer by a horizontal linear shading.
  814.  
  815. While this is mostly intended for test purposes, it can also be used to
  816. great effect with the 'combine' function.
  817.  
  818. @endnode
  819. @node "Frame menu"
  820.  
  821. @label "Mirror"
  822. @{B}Mirror image@{0}
  823. Mirrors an image horizontally or vertically.
  824.  
  825. @line 5 64 0
  826.  
  827. @label "Scale"
  828. @{B}Scale image@{0}
  829. Scales an image to an arbitrary size, with or without @{"smoothing" link "Smooth scale/rotate"}.
  830. A dialog box with many options is presented.
  831. Absolute values as well as percentages can be given for vertical and
  832. horizontal sizing. It's also possible to apply a given aspect
  833. correction (set in the 'Display options' dialog) or to size the image
  834. to fit the screen.
  835.  
  836. Use the 'Percentages' and 'Absolutes' radio buttons to switch between
  837. the two representations. Note that, due to rounding errors, the numbers
  838. can change slightly if you cycle between the two.
  839. Before performing the scaling, MGIF will convert to absolute sizes.
  840.  
  841. @line 5 64 0
  842.  
  843. @label "Zoom"
  844. @{B}Zoom into image@{0}
  845. Use the mouse or the cursor keys to move around a window covering one
  846. quarter of the image (if it fits on screen) to choose which part to
  847. enlarge two times.
  848.  
  849. To increase mouse movement speed, hold down 'Shift' and/or 'Control'.
  850. For cursor key movement, 'Shift' slows down and 'Control' speeds up.
  851. 'Help', 'Tab' or 'Alternate' (needs another key or mouse movement)
  852. toggles showing of the coordinates of the upper left window corner.
  853.  
  854. To select the current position, click the left mouse button or press
  855. 'Insert', 'Return', 'Enter' or 'Space'.
  856. To cancel the operation, click the right mouse button or press 'Undo',
  857. 'Esc' or 'Delete'.
  858.  
  859. @line 5 64 0
  860.  
  861. @label "Cut"
  862. @{B}Cut out part of image@{0}
  863. Cuts out a rectangular area of the image. A crosshair can be moved
  864. around with the mouse or the cursor keys to select first the top left
  865. corner and then the bottom right corner.
  866.  
  867. To increase mouse movement speed, hold down 'Shift' and/or 'Control'.
  868. For cursor key movement, 'Shift' slows down and 'Control' speeds up.
  869. 'Help', 'Tab' or 'Alternate' (needs another key or mouse movement)
  870. toggles showing of the coordinates of the upper left window corner.
  871.  
  872. To select the current position, click the left mouse button or press
  873. 'Insert', 'Return', 'Enter' or 'Space'.
  874. To cancel the operation, click the right mouse button or press
  875. 'Clr/Home', 'Undo', 'Esc' or 'Delete'.
  876.  
  877. @line 5 64 0
  878.  
  879. @label "Rotate"
  880. @{B}Rotate image@{0}
  881. Rotate an image to any integer angle, counter clockwise, with or without
  882. @{"smoothing" link "Smooth scale/rotate"}.
  883. If the source and destination buffers are the same, only +/- 45 degrees
  884. rotation is possible.
  885.  
  886. @line 5 64 0
  887.  
  888. @label "Border"
  889. @{B}Add an image border@{0}
  890. A dialog box is presented where the amount of space to be added on
  891. every side of the image can be entered. The colour index used for the
  892. added area can be given.
  893. In mapped mode the colour will depend on the palette in use.
  894. For greyscales or RGB, 0 will be black and 255 will be maximum
  895. intensity.
  896.  
  897. @endnode
  898. @node "Point menu"
  899.  
  900. @label "Hist equal"
  901. @{B}Equalize the image histogram@{0}
  902. This operation attempts to smooth out images with skewed or narrow
  903. histograms. The intensity values are redistributed to match their
  904. frequency of occurence.
  905.  
  906. @line 5 64 0
  907.  
  908. @label "Inversion"
  909. @{B}Invert image@{0}
  910. This is a bit more general than a simple digital negative. A threshold
  911. value is needed and this is used as follows:
  912.  
  913. threshold == 0:
  914.    new[i] = 255 - old[i]         Invert pixel
  915.  
  916. threshold < 0:
  917.    if old[i] < -threshold        Old intensity < -threshold?
  918.       new[i] = 255 - old[i]         yes, invert pixel
  919.    else
  920.       new[i] = old[i]               no, don't change
  921.  
  922. threshold > 0:
  923.    if old[i] > threshold         Old intensity > threshold?
  924.       new[i] = 255 - old[i]         yes, invert pixel
  925.    else
  926.       new[i] = old[i]               no, don't change
  927.  
  928. @line 5 64 0
  929.  
  930. @label "Log scale"
  931. @{B}Logarithmic scaling of image intensities@{0}
  932. Scale each pixel's value to the ratio of the logarithm of the pixel's
  933. intensity and the maximum intensity in the image.
  934.  
  935. @line 5 64 0
  936.  
  937. @label "Threshold"
  938. @{B}Threshold image@{0}
  939. Change all pixels with an intensity above a given threshold intensity
  940. to white and all those below the threshold to black.
  941.  
  942. @line 5 64 0
  943.  
  944. @label "Contr expan"
  945. @{B}Expand image contrast@{0}
  946. Attempts to expand the contrast of an image to cover the entire range
  947. of 256 allowable grey scales. A threshold value is used to remove
  948. intensity levels at the top and bottom of the histogram. The histogram
  949. is searched from the top and bottom for the first intensity level with
  950. more pixels than the threshold. The pixel intensities are then changed
  951. as follows:
  952.  
  953. new[i] = 255 * (old[i] - low) / (high - low)
  954.  
  955. where [low,high] is the new contrast range.
  956.  
  957. @line 5 64 0
  958.  
  959. @label "Brighten"
  960. @{B}Brighten image@{0}
  961. A constant value is added to every pixel's intensity. Any new values
  962. outside the range 0-255 are limited to these values.
  963.  
  964. @line 5 64 0
  965.  
  966. @label "Darken"
  967. @{B}Darken@{0}
  968. A constant value is subtracted from every pixel's intensity. Any new
  969. values outside the range 0-255 are limited to these values.
  970.  
  971. @line 5 64 0
  972.  
  973. @label "Gamma corr"
  974. @{B}Gamma correction@{0}
  975. The given value is divided by ten and then used to brighten or darken
  976. an image. Pure black and white will stay the same, but the shades in
  977. between will be modified in a non-linear fashion.
  978. A value of ten will keep the image unchanged, while lower values darken
  979. and higher ones brighten it.
  980.  
  981. @endnode
  982. @node "Area menu"
  983.  
  984. @label "Convolution"
  985. @{B}Apply convolution filter to image@{0}
  986. Apply one of a number of 3x3 convolutions to an image. Choose one of the
  987. built-in filters or enter your own.
  988. DSP code now gives @{B}very@{0} much faster operation (10x) on a Falcon.
  989.  
  990. Smoothing (low pass), edge detection (high pass), sharpening etc can
  991. all be done using these filters.
  992.  
  993. For more information on the filters, see 'Convolutions'.
  994.  
  995. Each pixel's intensity value is changed to a value calculated by
  996. multiplying the pixel intensities of the pixels in the surrounding 3x3
  997. square by the corresponding factors in the convolution matrix and
  998. summing up. A multiplier or divisor can be applied to the sum before
  999. the result is used as the new intensity.
  1000.  
  1001. @line 5 64 0
  1002.  
  1003. @label "Blur"
  1004. @{B}Blur image@{0}
  1005. Each pixel's intensity value is changed to the mean of the pixels in
  1006. a surrounding square. The size of the square can be given.
  1007.  
  1008. Although any odd number can be used as side length of the square, the
  1009. 3x3 square is the most useful. Special code is used to optimize the
  1010. speed of averaging such a square.
  1011. The method used to calculate the averages for non-3x3 squares is such
  1012. that the time it takes to process an image is proportional to the
  1013. length of the side rather than the area of the square.
  1014. An 11x11 square will take about twice as long as a 5x5 one, not four
  1015. times longer as would normally be expected.
  1016.  
  1017. @line 5 64 0
  1018.  
  1019. @label "Lmax"
  1020. @{B}Local maximum@{0}
  1021. Search a square of a given size for the highest intensity value and
  1022. replace the center pixel with that.
  1023. This is sometimes called erosion in other software.
  1024.  
  1025. For black and white images this has the effect of enlarging the white
  1026. areas. For greyscale images the effects are hard to describe, but
  1027. generally highlights become more visible.
  1028.  
  1029. @line 5 64 0
  1030.  
  1031. @label "Lmin"
  1032. @{B}Local minimum@{0}
  1033. Search a square of a given size for the lowest intensity value and
  1034. replace the center pixel with that.
  1035. This is sometimes called dilation in other software.
  1036.  
  1037. For black and white images this has the effect of enlarging the black
  1038. areas. For greyscale images the effects are hard to describe.
  1039.  
  1040. @line 5 64 0
  1041.  
  1042. @label "Median"
  1043. @{B}Median@{0}
  1044. Determine the median intensity value in a 3x3 square and replace the
  1045. center pixel with that.
  1046. DSP code now gives @{B}very@{0} much faster operation (5x) on a Falcon.
  1047.  
  1048. Useful for removing pixel noise and also for special effects.
  1049. If it's applied several times, interesting results can be had.
  1050.  
  1051. @line 5 64 0
  1052.  
  1053. @label "Oil"
  1054. @{B}Oil@{0}
  1055. Do an oilpaint alike 'smudging' of the picture.
  1056. The size of the 'smudging' square can be set as can the number of
  1057. 'buckets' to use. The second number should always be a power of two
  1058. (it's rounded if needed) and is used to group together similar
  1059. intensities. With the default, 64, the intensity 'resolution' is
  1060. 4 and with 16 it would be 16.
  1061. Far from all combinations of numbers work well. Experiment!
  1062.  
  1063. The routine searches through the square around every pixel and counts
  1064. how many there are of each intensity group. The value of the most
  1065. common group is used as new pixel value.
  1066.  
  1067. @line 5 64 0
  1068.  
  1069. @label "Pixelize"
  1070. @{B}Pixelize@{0}
  1071. Replace squares in the image with the mean value of the pixels in the
  1072. square. The size of the square is selectable.
  1073.  
  1074. This will give a nice looking 'mosaic' effect.
  1075.  
  1076. @endnode
  1077. @node "Options menu"
  1078.  
  1079. @label "Load"
  1080. @{B}Load options@{0}
  1081. Here you can set how images should be loaded and if anything special
  1082. should be done upon loading.
  1083.  
  1084. @{B}Display@{0}
  1085. Draw image directly after loading.
  1086.  
  1087. @{B}No grey@{0}
  1088. If this is not selected, every loaded image will be converted to
  1089. greyscales and the result put in the destination buffer, when there
  1090. is one.
  1091.  
  1092. @{B}Fit to screen@{0}
  1093. Size image to fit screen directly after loading.
  1094.  
  1095. @{B}Correct aspect ratio@{0}
  1096. Size image to correct aspect ratio directly after loading.
  1097.  
  1098. Grey    -  Images stored and displayed in greyscales.
  1099. Mapped  -  Images stored with their original number of colours and
  1100.            drawn as well as possible in the current screen mode.
  1101.            If the used graphics mode has fewer colours than the stored
  1102.            image, it may not look very good at all.
  1103.            JPEGs are automatically colour quantized at load time.
  1104. 24 bit  -  The red, green and blue components of the image are stored in
  1105.            separate buffers and will normally be displayed separately.
  1106.  
  1107. @line 5 64 0
  1108.  
  1109. @label "Display"
  1110. @{B}Display options@{0}
  1111. Under the display options you can select how the loaded images should
  1112. be displayed.
  1113.  
  1114. @{B}After processing@{0}
  1115. Display image after every successful image processing operation.
  1116.  
  1117. @{B}Flicker@{0}
  1118. Display greyscale images with mono flickering.
  1119.  
  1120. @{B}Ordered@{0}
  1121. Enable the ordered dithering when a mapped picture is displayed in a 16
  1122. colour mode or when a 24 bit picture is displayed in 256 or 16 colours.
  1123.  
  1124. @{B}Preview@{0}
  1125. Do quick preview first when drawing.
  1126.  
  1127. @{B}Center image@{0}
  1128. Images are drawn centered on the screen instead of in the upper left
  1129. corner.
  1130.  
  1131. @{B}Scrollable view@{0}
  1132. If a drawn image is larger than the screen, this will allow it all
  1133. to be viewed by moving the mouse.
  1134.  
  1135. @{B}Aspect ratio setting@{0}
  1136. Using 'options/aspect' it is possible to tell MGIF that the pixels on
  1137. your screen are not quadratic. The x/y ratio will be used when you
  1138. rotate images or if you use the aspect scale function.
  1139.  
  1140. You have to give the number of vertical pixels that corresponds to 100
  1141. horizontal. This number can easily be found by going into cut mode and
  1142. measuring on the screen while you move the crosshair.
  1143.  
  1144. @line 5 64 0
  1145.  
  1146. @label "F-S"
  1147. @{B}Floyd-Steinberg dithering options@{0}
  1148. The F-S error diffusion dithering can be improved by setting up and
  1149. selecting a noise addition factor and a Laplace edge detection filter.
  1150. These will not affect the image itself but the dithering process.
  1151. The options will slow the F-S dithering down quite a bit.
  1152.  
  1153. @{B}Laplace filter@{0}
  1154. Helps to define hard edges in images by applying a Laplace filter. A
  1155. quantity, Beta, is required. A value of one corresponds to a Beta of
  1156. 0.25, a value of two corresponds to a Beta of 0.50 etc.
  1157. The same effect can be had by giving a suitable matrix to the
  1158. convolution function.
  1159.  
  1160. @{B}Noise@{0}
  1161. Adds noise. This can help in images which have artificial banding as a
  1162. result of the dithering process. Input value is a percentage (0 to 100).
  1163.  
  1164. @line 5 64 0
  1165.  
  1166. @label "Quantize"
  1167. @{B}Colour quantize options@{0}
  1168. The MGIF colour quantize routines (from the IJG libraries) uses two
  1169. steps:
  1170.  
  1171. - Select the n best colours, where n normally is the number available
  1172.   in the selected graphics mode.
  1173.  
  1174. - Blend the colours with Floyd-Steinberg error diffusion dithering to
  1175.   make it look like a lot more of them are used. This does not use the
  1176.   same F-S code as the display algorithms, which is set up using
  1177.   another dialog.
  1178.  
  1179. These steps can be selected individually using 'two pass' (If this is
  1180. not selected, a default selection of colours is used.) and 'dither'
  1181. options respectively.
  1182.  
  1183. The colour selection is rather quick, but the F-S dithering is slow.
  1184.  
  1185. Colour quantization is a very complex operation and it needs a lot of
  1186. memory. The destination buffer and the extra screen will be used and
  1187. destroyed. Read also about virtual memory and temporary files.
  1188.  
  1189. @line 5 64 0
  1190.  
  1191. @label "Misc"
  1192. @{B}Miscellaneous options@{0}
  1193.  
  1194. @{B}RGB mode@{0}
  1195. If this has been selected, all image manipulation functions will
  1196. operate on all three RGB components (buffers).
  1197.  
  1198. @{B}VDI colour order@{0}
  1199. Some colour IMG files will get incorrect colours without this selected.
  1200.  
  1201. @{B}UNDO enable@{0}
  1202. Tell MGIF to start saving destination buffers before operations are
  1203. performed. '@{"UNDO" link "Image menu" "Undo"}' can be used to restore the image.
  1204.  
  1205. @line 5 64 0
  1206.  
  1207. @label "Help"
  1208. @{B}Help@{0}
  1209. Tell ST-Guide to display this manual.
  1210.  
  1211. @endnode
  1212. @node "Image processing operations"
  1213.  
  1214. @{B}Image processing operations@{0}
  1215. A rough split can be done between the operations that operate on the
  1216. pixel level and those that operate on complete images.
  1217.  
  1218. @{B}Pixel level operations@{0}
  1219. A further split is in order here since some operations only depend on
  1220. single pixels while others use several for each operation. I'll call
  1221. the former mappings and the latter filters.
  1222.  
  1223. @{B}Mappings@{0}
  1224. When the change to a pixel only depends on itself and not on any of
  1225. its neighbours a simple mapping, a table lookup, can be used to perform
  1226. the operation. For all these functions MGIF does in fact calculate a
  1227. table with entries for all 256 possible intensity values and then
  1228. applies this table to all pixels in the image.
  1229.  
  1230. The mapping operations in MGIF are found under the @{"point" link "Point menu selections"} menu.
  1231. 'Combine' and 'Change type' from the @{"buffer" link "Buffer menu selections"} menu are also more or less
  1232. mappings.
  1233.  
  1234. @{B}Filters@{0}
  1235. Filters depend on a surrounding of a pixel in some way. Many of the
  1236. filters in MGIF use a 3x3 surrounding box, but some can use a box of
  1237. any size you may wish. There is currently no support in MGIF for
  1238. non-rectangular surroundings, but that's very seldom a problem.
  1239. Unlike the mappings, the filter functions can not reasonably be
  1240. calculated once and for all and then applied since they, as mentioned,
  1241. depend on several pixels. For this reason these functions can often
  1242. take a while to apply. Don't worry, though, you'll only have to wait
  1243. more than a minute in extreme cases. Often ten seconds or less will
  1244. suffice.
  1245.  
  1246. Filters are often divided into linear and non-linear ones, depending on
  1247. what kind of operation they do on the pixels involved. Normally you will
  1248. have no reason to worry about that.
  1249.  
  1250. The filter operations in MGIF are found under the @{"area" link "Area menu selections"} menu.
  1251.  
  1252. @{B}Image level operations@{0}
  1253. These operations do not bother themselves with the actual pixels at all,
  1254. but rather with the image as a whole. The appearance of the image is
  1255. changed while (almost) nothing is done to its content.
  1256.  
  1257. The image level operations in MGIF are found under the @{"frame" link "Frame menu selections"} menu.
  1258. 'Quantization' from the @{"image" link "Image menu selections"} should perhaps not be here, but I don't
  1259. think it fits perfectly into any of my categories, so...
  1260.  
  1261. @endnode
  1262. @node "Configuration"
  1263.  
  1264. @{B}Configuration@{0}
  1265.  
  1266.   Command line switches
  1267.   Environment
  1268.   Options file
  1269.   Shortcut file
  1270.   Startup files
  1271.  
  1272. @endnode
  1273. @node "Options file"
  1274.  
  1275. @{B}Options file@{0}
  1276. At startup MGIF normally reads the file MGIF.OPT from the current
  1277. directory (this can be changed by the @{"-o switch" link "Command line switches" "options file"}).
  1278. In this file, any @{"command line switches" link "Command line switches"} can be given.
  1279.  
  1280. Everything in the options file will be interpreted as options, unless
  1281. there is a leading '#' on a row, which signifies a comment.
  1282. The position of a switch within a row is totally irrelevant.
  1283.  
  1284. The supplied MGIF.OPT has a couple of default switches set and all the
  1285. rest (that are useful in an auto-loaded options file) described but
  1286. disabled by a leading '#'.
  1287.  
  1288. Options given in a file like MGIF.OPT can be @{"written permanently" link "File menu" "Write configuration"} into
  1289. the MGIF executable.
  1290.  
  1291. @endnode
  1292. @node "Shortcut file"
  1293.  
  1294. @{B}Shortcut file@{0}
  1295. All menu items in MGIF can be selected by keyboard shortcuts, if they
  1296. are set up correctly. To make this feature as flexible as possible, all
  1297. the definitions are read from the file MGIF.KEY at startup (this can be
  1298. changed by the @{"-key switch" link "Command line switches" "key file"}).
  1299.  
  1300. The supplied MGIF.KEY file defines a couple of default shortcuts and
  1301. can easily be used as an example for customization.
  1302. The important parts of a definition line in the file is as follows:
  1303.  
  1304. - First 'word' to search for.
  1305. - Second 'word' to search for (not needed).
  1306. - Shift keys:   c - Control  s - Shift   a - Alternate
  1307. - Key
  1308.  
  1309. A 'word' is either a single word or something between two double quotes.
  1310. Normally only one search 'word' is needed. This would then be the text
  1311. on the menu item in question. Sometimes that is not enough, since there
  1312. can be multiple items with the same name in different menu positions. In
  1313. those cases the second 'word' will be searched from where the first was
  1314. found. The first should then be one found at such a place as to make the
  1315. second one the correct.
  1316.  
  1317. Any Control/Shift/Alternate combination can be given for a shortcut.
  1318.  
  1319. An example:
  1320.   @{"Palette" ignore},Load    csP
  1321.  
  1322. It was not possible to give only 'Load' since that would have found the
  1323. file load item first. By looking for '@{"Palette" ignore}' at the start of the
  1324. search, the incorrect one is bypassed.
  1325. The shortcut is set to Control-Shift-P.
  1326.  
  1327. For the time being there is no way to use special keys such as 'ESC',
  1328. 'F9', 'Help' etc as shortcut keys (950726).
  1329.  
  1330. @endnode
  1331. @node "Environment"
  1332.  
  1333. @{B}Environment@{0}
  1334. MGIF makes use of a couple of environment variables:
  1335.  
  1336. MGIF_OPT - Options parsed as if given on the command line.
  1337. TMP      - A directory used for temporary storage.
  1338. TEMP     - If the above was not available.
  1339.  
  1340. @endnode
  1341. @node "Startup files"
  1342.  
  1343. @{B}MGIF startup files@{0}
  1344. When MGIF is run it normally tries to load the following files:
  1345.  
  1346. 1 MGIFv5.RSC   Normal GEM resource file
  1347. 2 @{"MGIF.OPT" link "Options file"}     Various setup values etc.
  1348. 3 @{"MGIF.KEY" link "Shortcut file"}     Keyboard shortcut setups.
  1349. 4 MGIF.DTT     Ordered dither matrices.
  1350. 5 MGIF_FL.EXE  Program code for self-running flicker files.
  1351.  
  1352. The first one can be modified using any resource editor, with the same
  1353. limitations as normally applies to such things.
  1354. Number 2 and 3 can, and should, be modified to make MGIF behave in a
  1355. way that pleases you.
  1356. Number 4 can be modified, but I'd rather recommend creating a .DIT file
  1357. (the kind used by 'GEMView' and 'Speed of Light') and load that instead.
  1358. The 'GEMView' distribution contains (or at least used to) a FreeWare
  1359. program for doing that.
  1360. The last file should not be modified (unless you @{B}really@{0} know what you
  1361. are doing).
  1362.  
  1363. You can change where MGIF loads the last four files from using @{"switches" link "Command line switches" "Config files"}.
  1364.  
  1365. @endnode
  1366. @node "Definitions"
  1367.  
  1368. @{B}Definitions@{0}
  1369.  
  1370.   Greyscale
  1371.   Mapped colour
  1372.   True colour (24 bit)
  1373.   Convolutions
  1374.   Unsharp masking
  1375.   Spatial frequency
  1376.   Histogram
  1377.   Palette
  1378.   Floyd-Steinberg
  1379.   Ordered dither
  1380.   Halftone
  1381.  
  1382. @endnode
  1383. @node "Greyscale"
  1384.  
  1385. @{B}Greyscale@{0}
  1386. Obviously an image that is represented in greyscales can have no colour
  1387. whatsoever. For every pixel the intensity is stored as an eight bit
  1388. value, 0-255. 0 is black and 255 is white.
  1389.  
  1390. @endnode
  1391. @node "Mapped colour"
  1392.  
  1393. @{B}Mapped colour@{0}
  1394. For an image that is stored in mapped colour mode, an eight bit value
  1395. for each pixel is an index into a palette of colours. Nothing can be
  1396. said from only the value.
  1397.  
  1398. @endnode
  1399. @node "True colour"
  1400.  
  1401. @{B}True colour@{0}
  1402. As the name suggests, this is the mode to use if you want to keep all
  1403. the colour in an image. Normally eight bits per colour component (Red,
  1404. Green and Blue) is deemed enough for lifelike reproduction, but that is
  1405. not really true. Unfortunately, image file formats that can handle more
  1406. than 24 bits per pixel are not very common.
  1407.  
  1408. Since the three intensity values for every pixel use the same number
  1409. of bits as for a greyscale one, true colour images are most often
  1410. handled as three separate greyscale pictures.
  1411.  
  1412. @endnode
  1413. @node "Convolutions"
  1414.  
  1415. @{B}Convolutions@{0}
  1416. My Oxford Advanced Learners Dictionary suggests that a convolution is a
  1417. twist or a coil, which is not much help, I guess.  ;-)
  1418.  
  1419. Fundamentals of digital image processing gives a formula,
  1420. "the convolution of the input with the impulse response" for shift
  1421. invariant systems, which probably won't help you any more....
  1422.  
  1423. Let's take a few examples instead:
  1424. The blur function from the menu is rather simple to understand. Blur
  1425. calculates the average value of, by default, the nine pixels closest to
  1426. every point in the image and then replaces the middle pixel with that
  1427. value.
  1428.  
  1429. Part of the image:      Average:
  1430. 15 34 10
  1431.  8 40 50            (15 + 34 + 10 + 8 + 40 + 50 + 4 + 20 + 80) / 9 = 29
  1432.  4 20 80
  1433. The pixel value 40 is replaced with 29.
  1434.  
  1435. The blur can be performed using a very simple convolution:
  1436. 1 1 1
  1437. 1 1 1    / 9
  1438. 1 1 1
  1439.  
  1440. When a convolution of an image is done, every pixel and its eight
  1441. neighbours are multiplied by the corresponding elements in the matrix
  1442. and the results added up. The scaling factor (in this case 1/9) is then
  1443. multiplied to the sum. Finally the result is written back as the new
  1444. value for the middle pixel.
  1445.  
  1446. If you try it, you'll see that doing the blur by using the convolution
  1447. matrix will be @{B}much@{0} slower, but will give exactly the same result as
  1448. the menu version. Exactly the same operation is performed, but the
  1449. specialised blur can avoid all the multiplies, since they are all by the
  1450. number 1.
  1451.  
  1452. Now, if all that could be done with the convolution matrix was a slow
  1453. version of blur, it would be quite useless. However, as you might have
  1454. seen, there are a number of predefined convolution matrices that can be
  1455. selected in the dialog. Some of these have almost understandable names,
  1456. like high pass, while other have totally meaningless ones, like Sobel.
  1457. There is a great deal of relatively difficult maths involved in creating
  1458. some of these, but they can be used without any knowledge whatsoever, to
  1459. create nice effects.
  1460.  
  1461. The names like high pass and low pass refer to the same thing as they do
  1462. in audio, namely filtering of frequences. In a picture these are called
  1463. @{"spatial frequences" link "Spatial frequency"} and they are only slightly more complicated to handle
  1464. than an audio signal. The complication is, of course, that pictures have
  1465. two dimensions, while an audio signal has only one. Each line and each
  1466. column in the picture can, however, be seen as a one dimensional signal.
  1467.  
  1468. Now what does low pass mean in a picture?
  1469. Well, a low pass filter removes high frequencies, which in an image is
  1470. equivalent to hard edges. A black box on a white background is a typical
  1471. hard edge situation. The edges of the box will be blurred if a low pass
  1472. filter is applied to the image (Yes, blur is a low pass operation!).
  1473.  
  1474. A high pass filter does exactly the opposite of the low pass, naturally.
  1475. The hard edges will be preserved, but the soft ones will be suppressed.
  1476. In the box case above, that would mean that only the exterior border of
  1477. the box would be left! These filters are therefore used for edge
  1478. detection.
  1479.  
  1480. The blur filter was a simple example of a low pass filter, which can
  1481. easily be adapted to be more useful. Consider the following filter:
  1482. 1  1  1
  1483. 1 12  1       / 20
  1484. 1  1  1
  1485.  
  1486. The difference from the original blur is that the middle value, which is
  1487. the one that will be multiplied by the pixel that is being checked
  1488. (remember?) has been increased a lot and the scale factor reduced. Note
  1489. that the sum of the original filter was nine and of this one is twenty,
  1490. thus the scaling factor brings the total weight down to one. This is
  1491. essential since a higher value would cause the whole image to become
  1492. brighter and a lower one, darker.
  1493. This new filter will still blur the image, but the increased weight of
  1494. the middle pixel means that it will be more "important" than the
  1495. surrounding ones. The result of this is a much more subtle blur, very
  1496. useful for removing the dithering used in most GIF pictures for example.
  1497. Experiment!
  1498.  
  1499. Try all the filters on some image (with source and destination set to
  1500. different buffers) and see for yourself what they do. Some of them
  1501. blur, some enchance edges, some keeps only edges and some create nice
  1502. effects (try the gradients).
  1503.  
  1504. The total sum of the filters (nine and twenty above) can be interesting
  1505. to change for effect. The easiest thing to do is to change the value of
  1506. the middle matrix value.
  1507. If a filter sum is zero, only a small portion of the image information
  1508. (like the edges) will be kept. If you add one to the value in the
  1509. middle, however, the complete original image will be added to that small
  1510. part (think about it!) and conversely, sutracting one will remove the
  1511. complete image data.
  1512.  
  1513. The convolution is a very powerful function that can give very
  1514. satisfying results without using anything other than the predefined
  1515. matrixes from the dialog.
  1516.  
  1517.  
  1518. An extra example, a Laplace convolution matrix:
  1519.  
  1520.   -1  -1  -1
  1521.   -1   8  -1
  1522.   -1  -1  -1
  1523.  
  1524. As you can see, the point being processed and the 8 points surrounding
  1525. it cancel each other out if they have equal values (x) when added
  1526. together:
  1527.  
  1528. 8 * x + 8 * (-1 * x) = 0
  1529.  
  1530. The more the surrounding pixel values differ from the central one, the
  1531. greater the result's difference from zero. The resulting image will have
  1532. colors only where colors on the original change (test it!).
  1533.  
  1534.    0   0   0
  1535.    0   1   0
  1536.    0   0   0
  1537.  
  1538. This is a matrix that won't change the image as the coefficients for
  1539. the surrounding pixels are zero (test it!). Adding this matrix to the
  1540. previous Laplace one will give you the original image plus the edge
  1541. enhancement.
  1542.  
  1543.   -1  -1  -1
  1544.   -1   9  -1
  1545.   -1  -1  -1
  1546.  
  1547. With this your image will really get some edge.
  1548.  
  1549. @endnode
  1550. @node "Unsharp masking"
  1551.  
  1552. @{B}Unsharp masking@{0}
  1553. This is a general name for the process of subtracting a low-pass
  1554. filtered image from its original, creating a sharpened image.
  1555.  
  1556. In MGIF this currently has to be done in two steps:
  1557. - Filter an image using whatever filter you like from the '@{"Area" link "Area ms"}' menu,
  1558.   for example a 5x5 blur. You'll often get interesting effects even from
  1559.   filters that are not in the least 'low-pass'.
  1560.   The destination buffer must not be the same as the source.
  1561. - Use 'Combine' to subtract @{B}part@{0} of the filtered image from the
  1562.   original.
  1563.  
  1564. Most of the time you want to make sure that the factors you multiply the
  1565. source and destination image pixels by sum up to one. Otherwise the new
  1566. image will be darker or brighter than the original.
  1567.  
  1568. For example:                        Percent  source    dest
  1569.   dest = source * 2 - dest * 1                 67       33
  1570.   dest = source * 20 - dest * 19               51       49
  1571.   dest = (source * 4 - dest * 1) / 3           80       20
  1572.  
  1573. If you're going to use non-integer factors it's a good idea to make the
  1574. divisor separate, as in the last example. Otherwise you'll loose a lot
  1575. of precision due to the way MGIF does the image combination.
  1576.  
  1577. @endnode
  1578. @node "Spatial frequency"
  1579.  
  1580. @{B}Spatial frequencies in a picture@{0}
  1581. Think about every line in the image as an intensity "wave".
  1582. This is of course exactly what it is when the image is displayed on a
  1583. monitor. Now, that intensity wave could look like the following:
  1584.       _______       _______
  1585. ______|     |_______|     |_______  (Should be a square wave)
  1586.  
  1587. If the low value of that wave signified the lowest intensity level and
  1588. the high level the brightest, that would show up on a perfect display
  1589. as a number of clearly defined lines. Since no perfect display exists,
  1590. they all have bandwidth limitations like audio equipment, the edges of
  1591. the lines will be a bit softened.
  1592. The images brightness "wave" has been low pass filtered!
  1593.  
  1594. A normal monitor is quantized (scanlines) in the vertical direction,
  1595. which means that there is no ordinary filtering taking place. Instead
  1596. lines blend slightly with each other. This, however, does not stop us
  1597. from looking at each column in the image as a brightness "wave" as
  1598. well.
  1599.  
  1600. @endnode
  1601. @node "Histogram"
  1602.  
  1603. @{B}Histogram@{0}
  1604. The histogram of an image is a distribution curve showing how common the
  1605. intensity values (or palette indeces) are in the given picture. This is
  1606. unfortunately only available from the text interface in the current MGIF
  1607. version.
  1608.  
  1609. @endnode
  1610. @node "Palette"
  1611.  
  1612. @{B}Palette@{0}
  1613. The palette is a kind of lookup table that holds the real colours of an
  1614. image stored in mapped mode. For each colour index there are three eight
  1615. bit intensity values. That is one each for the red, green and blue
  1616. components of the colour.
  1617.  
  1618. @endnode
  1619. @node "Floyd-Steinberg"
  1620.  
  1621. @{B}Floyd-Steinberg dithering@{0}
  1622. This is the most common variant of error diffusion dithering.
  1623. The idea behind error diffusion dithering is to calculate how large
  1624. an error there is when a particular pixel is converted for display.
  1625. That error is then distributed to neighbour pixels that have not yet
  1626. been displayed.
  1627.  
  1628. When the pixels are small enough (and packed close enough), the human
  1629. eye will be tricked into seeing more different colours/greyscales.
  1630.  
  1631. @endnode
  1632. @node "Ordered dither"
  1633.  
  1634. @{B}Ordered dithering@{0}
  1635. A method for dithering where a pseudo-random matrix of values is matched
  1636. with the the pixels' intensities in the image that is being displayed.
  1637.  
  1638. This is a quick dithering method that is useful when the output media
  1639. can display single pixels. A normal monitor is, such a device.
  1640.  
  1641. @endnode
  1642. @node "Halftone"
  1643.  
  1644. @{B}Halftoning@{0}
  1645. Halftoning of an image is done in exactly the same way as ordered
  1646. dithering. The only difference is that the matrix used is not
  1647. pseudo-random, but rather 'clustered' in a way. The reason for the
  1648. clustering is that many hard-copy devices, such as printers and
  1649. photo-setters are incapable of creating minimum size dots.
  1650.  
  1651. @endnode
  1652. @node "Algorithms"
  1653.  
  1654. @{B}Algorithms@{0}
  1655. Nothing here yet, unfortunately.
  1656. The complex stuff from the manipulation tool descriptions will be moved
  1657. here later.
  1658.  
  1659. @endnode
  1660. @node "Literature"
  1661.  
  1662. @{B}Literature@{0}
  1663.  
  1664.    Gonzales and Wintz, Digital Image Processing.
  1665.    Lindley, Practical Image Processing In C.
  1666.    Burger and Gillies, Interactive Computer Graphics.
  1667.    Anil K Jain, Fundamentals of Digital Image Processing.
  1668.    Foley/Van Dam, Computer Graphics: principles and practice.
  1669.    Baxes, Digital Image Processing: principles and applications.
  1670.  
  1671. @endnode
  1672. @node "Authors"
  1673.  
  1674. @{B}Authors@{0}
  1675. Information about email addresses, other software written, favourite
  1676. books and movies, life story etc is included when available.  ;-)
  1677.  
  1678. Current developer
  1679.   Johan Klockars
  1680.  
  1681. Original author
  1682.   William Rosenkranz
  1683.  
  1684. Minor contributors
  1685.   Howard Chu       (original overscan support)
  1686.   Frank M"hle      (original JPEG support)
  1687.   Klaus Pedersen   (original flicker screen code)
  1688.   Eero Tamminen    (various GEM stuff)
  1689.  
  1690. @endnode
  1691. @node "Special thanks"
  1692.  
  1693. @{B}Special thanks@{0}
  1694.  
  1695. To the Free Software Foundation,
  1696.    the Independent JPEG Group and
  1697.    Ron Reyner of Canada.
  1698.  
  1699. @endnode
  1700. @node "The future"
  1701.  
  1702. @{B}The future@{0}
  1703. This text describes some of the future plans for MGIF. They may all
  1704. or none come true. Of the four things mentioned in priority order in
  1705. the documentation for MGIF 4.2, only number two and number four were
  1706. implemented in this version, more than two years later...
  1707.  
  1708. If you have any ideas of your own, or feel strongly about some of those
  1709. outlined below, please send @{"mail, email or phone" link "Johan Klockars" "email"}.
  1710.  
  1711. @{B}Planned improvements to MGIF@{0}
  1712. - The point menu will be completely replaced by a dialog where the user
  1713.   can change an images intensity values in a number of ways. A first
  1714.   version of the dialog is already in the resource, but there is quite
  1715.   a bit of code that remains to be written.
  1716. - Some day MGIF will be able to draw images in windows. That will most
  1717.   likely be after the next point has been addressed, though.
  1718. - MGIF is going to be somewhat rewritten to run as two or more tasks,
  1719.   side by side, under MultiTOS/MiNT/MagiC and communicating via pipes.
  1720. - More Falcon030 DSP support will be added for operations where it's
  1721.   useful. These include GIF loading and dithering.
  1722. - Batch processing of images will be implemented.
  1723. - A programming language will be included for flexibility (and fun ;-).
  1724. - A module concept will be implemented to enable simple extensions to
  1725.   the MGIF framework.
  1726.   Modules from the GIMP, an image manipulation program for UNIX, will
  1727.   most likely be supported.
  1728. - Operations on individual bit planes will be supported.
  1729. - A more flexible memory handling scheme, capable of any number of
  1730.   buffers, will be implemented.
  1731.  
  1732. @{B}Other ideas@{0}
  1733. - Since the largest part of MGIF is quite independent of the underlying
  1734.   operating system, a port to MiNT with X or perhaps Linux has been
  1735.   considered.
  1736.  
  1737. @endnode
  1738. @node "Bug report form"
  1739.  
  1740. @{B}Bug report form@{0}
  1741. If you find any bugs in MGIF I'd very much like to hear about them.
  1742. There's of course no need to use this form, but it mentions a few
  1743. points that might be useful to me when I try to eliminate the problem.
  1744.  
  1745. MGIF version:
  1746. MGIF mode used:
  1747. MGIF switches:
  1748. Computer type:
  1749. Graphics card:
  1750. Operating system:
  1751. AUTO folder programs:
  1752. Accessories:
  1753. Other info:
  1754. Type of bug:
  1755. MGIF debug messages:
  1756.  
  1757. @endnode
  1758. @node "Questionary"
  1759.  
  1760. @{B}Questionary@{0}
  1761. I'm always looking for people's opinions on MGIF. A lot of the features
  1762. in version 5 would never have been implemented if it weren't for the
  1763. feedback I got from users (MGIFv5 would probably have been released
  1764. a year earlier, though, but that's another matter ;-).
  1765.  
  1766. First, it has been pointed out to me that the name MGIF has become very
  1767. misleading. This is of course true, but I'm not so sure it's a good
  1768. idea to change it anyway. What do you think? Any name suggestions?
  1769. The person who submits the name I decide is best will receive the latest
  1770. version of MGIF on a signed disk.  ;-)
  1771.  
  1772. Some things that it would be interesting to hear your views on are:
  1773.  
  1774. - GEM interface
  1775. - Text interface
  1776. - Manual
  1777. - Colour support
  1778. - Graphics card support
  1779. - Image processing features
  1780. - File type support
  1781. - OS support
  1782.  
  1783. Any other ideas or thoughts?
  1784. Also take a look at 'The future'.
  1785.  
  1786. @endnode
  1787. @node "The text interface"
  1788.  
  1789. @{B}The text interface@{0}
  1790. For MGIFv5 very few changes have been made, so far, to the old text
  1791. interface. It does not even support some of the newer features.
  1792. Since some people, however, want to run MGIF from a command line, for
  1793. example when running MiNT without GEM, I have kept and slightly extended
  1794. the text interface.
  1795.  
  1796. The available short commands are given below. Where applicable the
  1797. actual command that is executed is named. Those commands, and a few
  1798. other that are otherwise only accessible through the GUI, can be used
  1799. with the 'x' (extended) command.
  1800.  
  1801. a   all         Operate on all three RGB components
  1802. br  brighten    Brighten image
  1803. bl  blur        Blur image
  1804. cp  copy        Copy between source and destination buffers
  1805. cu  cut         Cut out part of an image
  1806. co  contrast    Contrast expand image
  1807. d   test        Create a test image (linear shade)
  1808. e   enlarge     Enlarge image two times
  1809. f   file        Save flicker image
  1810. g   beta        Set laplace beta for F-S draw
  1811. hi  histogram   Draw the histogram of an image
  1812. he  equalize    Equalize the histogram of an image
  1813. i   inverse     Make a negative image
  1814. j   again       Do last operation again
  1815. k   quantize    Quantize an RGB image
  1816. l   log         Logarithmic intensiy scaling of an image
  1817. mi  mirror      Mirror an image
  1818. me  median      Median filter an image
  1819. n   noise       Set noise for F-S drawing
  1820. o   toggle      Toggle source buffer
  1821. p   shtrue      Draw RGB image
  1822. q   quit        Exit this image
  1823. r   rotate      Rotate image
  1824. s   shrink      Shrink an image two times
  1825. t   threshold   Threshold an image
  1826. u   dtoggle     Toggle destination buffer
  1827. v   convolve    Apply a convolution filter to an image
  1828. w   what        Show some information about the buffers
  1829. x   extended    Do extended operation, that is give command
  1830. y   size        Scale image
  1831. z   zoom        Zoom part of an image
  1832. ?   help        Show help screens
  1833. ESC exit        Quit MGIF
  1834. SPC draw        Draw destination
  1835. RET show        Show a drawn image when possible
  1836.  
  1837. Apart from the commands given above, the following are also
  1838. available using 'x'.
  1839.  
  1840.     cnvspace    (Internal MGIF operation)
  1841.     sourcen     Set source buffer
  1842.     destn       Set destination buffer
  1843.     drawn       Draw given buffer
  1844.     oil         Do oilpaint 'filtering'
  1845.     lmin        Do local minimum 'filtering'
  1846.     lmax        Do local maximum 'filtering'
  1847.     sub         Subtract source image from destination
  1848.     border      Add borders to an image
  1849.     chgtype     Change the type of an image
  1850.     pixelize    'Pixelize' image
  1851.     gamma       Do gamma correction
  1852.     shear       Shear an image
  1853.     tile        Tile an image to a given size
  1854.     tileize     Make an image perfectly tileable
  1855.  
  1856. @endnode
  1857. @node "Frequently Asked Questions"
  1858.  
  1859. @{B}Frequently asked questions@{0}  (Last updated 960706)
  1860. This text mentions a few things that are not covered in the rest of the
  1861. documentation for MGIF or that have caused problems for beta testers
  1862. earlier.
  1863. If you can't find the answer to a question here, please contact the
  1864. @{"author" link "Johan Klockars"}. Any questions of general interest will be added to later
  1865. revisions of this text.
  1866.  
  1867. 1.  Why doesn't quantize work?
  1868.  
  1869.     Currently the destination buffer must be set to 0 for the quantize
  1870.     function to work. You must of course have three buffers (red, green
  1871.     and blue) as well.
  1872.  
  1873.  
  1874. 2.  Why doesn't the oil paint function work?
  1875.  
  1876.     I've not yet implemented the oil paint function for source == dest.
  1877.     This makes it impossible to use the automatic RGB processing, so for
  1878.     that you have to do:
  1879.       source = buffer 0, dest = buffer 3, do oil paint, copy dest->source
  1880.       source = buffer 1,            -           "         -
  1881.       source = buffer 2,            -           "         -
  1882.  
  1883.  
  1884. 3.  I've just loaded a 16 colour picture, but the image looks very bad
  1885.     in 16 colour mode. What am I doing wrong?
  1886.  
  1887.     Earlier versions of MGIF always used ordered dither when displaying
  1888.     images in 16 colour mode, even if the image only used 16 colours.
  1889.     In most cases that's not so anymore, but MGIF can still be fooled.
  1890.  
  1891.     The ordered dither display does not work very well with images that
  1892.     have few colours. If you turn off the dither using the 'ordered'
  1893.     switch under the 'options/display' menu, the picture will most
  1894.     likely look much better.
  1895.  
  1896.  
  1897. 4.  What mode should I use for image processing?
  1898.  
  1899.     The mapped colour mode is not very useful for image processing
  1900.     purposes. The scaling, median filter and oil paint functions work,
  1901.     but not much else.
  1902.     Greyscale and 24 bit mode are both fine, but all functions will be
  1903.     three times as fast in greyscales, naturally. If you're not
  1904.     planning on keeping the colour, use greyscales all the time.
  1905.  
  1906.  
  1907. 5.  Can MGIF do the nice relief (stone carving) effects I've seen in
  1908.     other programs?
  1909.  
  1910.     Yes, embossing (which is the normal name for that) can easily be
  1911.     done using the convolutions. Select any filter but those in the
  1912.     first two columns and put 128 as bias value.
  1913.     Take a look under 'Tutorials' for examples on use.
  1914.  
  1915.  
  1916. 6.  What are convolutions?
  1917.  
  1918.     Convolutions are general digital filters. The ones included in the
  1919.     dialog are low pass, edge enhancment and edge detection filters.
  1920.     Take a look under 'Tutorials' for examples of use.
  1921.  
  1922.  
  1923. 7.  What file format does copy/paste and UNDO use?
  1924.  
  1925.     It's an internal uncompressed format that can't be read by anything
  1926.     other than MGIFv5.
  1927.  
  1928.  
  1929. 8.  How do I save in the .FL format?
  1930.  
  1931.     You must have drawn the image in flicker mode. Then the normal save
  1932.     dialog can be used. For the text interface, refer to the 4.2 docs.
  1933.  
  1934.  
  1935. 9.  Can I change dither matrix after MGIF has started?
  1936.  
  1937.     Yes, simply load a new .DIT or .DTT file with 'load file'.
  1938.  
  1939.  
  1940. 10. Can MGIF scale an image to fit the screen directly upon loading?
  1941.  
  1942.     Yes, take a look in the 'options/load' dialog. You can also have
  1943.     automatic scaling to fix the aspect ratio.
  1944.  
  1945.  
  1946. 11. Is it possible to scroll around an image larger than the screen?
  1947.  
  1948.     MGIF will happily scroll around an image of any size by redrawing
  1949.     newly exposed areas. There is no real 'virtual screen' built in,
  1950.     but you can run MGIF together with any of the usual ones, such as
  1951.     BIGScreen or the one included in BlowUP030.
  1952.  
  1953.  
  1954. 12. Why does my Falcon lock up when I try to use the convolution or
  1955.     median filter functions?
  1956.  
  1957.     The supplied MGIF.OPT file sets the -dsp switch to enable the use
  1958.     of the DSP chip in the Falcon and the -dhs switch to force hand-
  1959.     shaking to take place when the CPU and DSP exchanges data.
  1960.     The communication is faster without the -dhs switch but there may
  1961.     be problems, especially with accelerated machines.
  1962.     If you have not disabled -dhs, the last resort would be to disable
  1963.     -dsp to turn off DSP usage. That should never be necessary, though.
  1964.  
  1965. @endnode
  1966. @node "Tutorials"
  1967.  
  1968. @{B}Tutorials@{0}
  1969. There are some examples of image processing in the EXAMPLES directory
  1970. which are well worth looking at (and trying out for yourself).
  1971. The ideas below are just as useful.
  1972.  
  1973. It has come to my attention that not many people use the convolution
  1974. filters supported by MGIF. This is quite a pity, since they can be
  1975. used for a lot of interesting effects.
  1976.  
  1977. I've now included a small GIF file, INTEL.GIF, which can be used for
  1978. experimenting. Not that you can't use your favourite GIF, but this
  1979. one is small (thus fast loading and processing) and simple enough
  1980. to make the filter effects very obvious most of the time.
  1981.  
  1982. A few things to try out:
  1983.  
  1984. Lmin/Lmax - Try with some values around 3-30. Nice, eh?
  1985.             What would this look like with a more normal image?
  1986.  
  1987. Low pass  - The low pass filters do very much the same thing as 'Blur'
  1988.             in the menu (in fact the first of the low pass filters is
  1989.             exactly the same as a 3x3 blur).
  1990.             These are not very useful on the INTEL.GIF image, but can
  1991.             look good on normal ones. If a GIF looks grainy due to
  1992.             previous dithering, try low pass.
  1993.  
  1994. High pass - High pass filters used for contour extracting or emphasis.
  1995. Laplace     On a normal image it may not be very clear what's going on,
  1996. Gradient    but with INTEL.GIF it should be quite obvious.
  1997. Sobel       If you change the 'Bias' from 0 to 127, most of these
  1998. ...         filters will give very nice stone-carving look-alikes.
  1999.             Experiment with the directions.
  2000.  
  2001. @endnode
  2002. @node "William Rosenkranz"
  2003.  
  2004. @{B}William Rosenkranz@{0}
  2005. The text was written in answer to an email by me (Johan), so it might
  2006. be a little incoherent. That is not Bill's fault in any way.
  2007. The questions/suggestions are marked with a '-' at the beginning.
  2008.  
  2009. - School and work experience.
  2010.  
  2011. At 40 years old, I barely remember school... :-)
  2012.  
  2013. I am employed as Senior Systems Engineer at Convex Computer Corp. Convex
  2014. makes and sells supercomputers. I live in the Detroit, MI (USA) area.
  2015. Basically, my job is to help sell these systems. I do product
  2016. presentations, benchmarks, write proposals, etc. Actually very little
  2017. programming on the job, other than tuning code (mostly Fortran) for
  2018. vector supercomputers and more recently scalable parallel processors
  2019. (MPPs) which Convex makes. The latter are based on HP PA-RISC
  2020. processors.
  2021.  
  2022. - Descriptions of any other programs etc you have written.
  2023.  
  2024. On the Atari, mostly Unix-like tools (nroff, man, manpager, etc.). I
  2025. rarely write much code from scratch these days since I have so little
  2026. time. When I do, it is usually little utilities for work. All my other
  2027. programming is porting/fixing/tuning customer Fortran codes.
  2028.  
  2029. - Favourite books, movies and TV series.
  2030.  
  2031. I read a lot of history. Mostly ancient history (like bronze-age Greece)
  2032. and the Renaissance (planning a trip to Florence this summer). I am also
  2033. attempting to write a book.
  2034.  
  2035. Films are one of my main interests. I like just about anything, if it is
  2036. well done or has some merit (in my eyes). I don't watch much TV outside
  2037. of CNN for news. I.e., I am not a good sales target for 500-channel TV!
  2038. I am also trying to write a screenplay, though this is going very slowly
  2039. because of a hectic work schedule (I'll be on a plane to Chicago in a
  2040. couple of hours, for example).
  2041.  
  2042. @endnode
  2043. @node "Johan Klockars"
  2044.  
  2045. @{B}Johan Klockars@{0}
  2046. Email, WWW, snail mail and telephone numbers can be found at the very
  2047. end of this text.
  2048.  
  2049. @{B}Other programs I've written and projects I'm involved in@{0}
  2050. The major software mentioned here can be accessed from my WWW/ftp site.
  2051. For other things, please contact me directly.
  2052.  
  2053. Before I took over the development of MGIF, I worked for quite some time
  2054. on a Sinclair QL emulator for the Atari ST series. There had been no
  2055. development of that since '91, but after MGIF v5.00 was released, I
  2056. picked it up again. The emulator, QLem, works rather nicely on the 68000
  2057. Ataris and, since the recent v1.45, Falcons. The latest version may
  2058. actually work on TTs as well, but I have no way of testing that.
  2059. QLem also works to some degree under STonX (an ST emulator for any
  2060. machine running UNIX and X) v0.6.5, but there are major problems.
  2061.  
  2062. Currently I'm involved in an internet project where we plan to,
  2063. eventually, bring a DOOM(TM) compatible game to the Falcon030.
  2064. The game will of course not be an exact copy of DOOM, but we intend to
  2065. make it compatible with all the WAD files out there.
  2066. Right now (960706), the latest publically released binary version is
  2067. 2.14alpha (the released sources are at 2.06alpha). It allows you to run
  2068. about in texture mapped 3D at a very reasonable frame rate even on a VGA
  2069. monitor, if you lower the resolution a bit from the default 320x200.
  2070. All walls, floors and ceilings are mapped with the correct textures,
  2071. including transparent ones, and the light effects are nearly perfect.
  2072. Running in Falcon TC mode, it looks a lot better than the original, IMHO.
  2073. The working name of the project is 'BAD MOOD' for reasons that may not be
  2074. entirely obvious.  ;-)
  2075.  
  2076. Further, I've of course written some small utilities when I needed them
  2077. (for example a Falcon SCSI DMA tester) and fixed compatibility problems
  2078. with programs I wanted to run on my Falcon. An example of the latter is
  2079. my fix for running the Magnetic Scrolls adventures with the new graphics
  2080. interface in any resolution on the Falcon.
  2081.  
  2082. @{B}Education and work@{0}
  2083. I spent almost five years at Chalmers University of Technology in
  2084. Gothenburg and left with an MSc in Computer Science and Engineering.
  2085. Currently I'm working on my PhD in what might perhaps be called something
  2086. like 'VLSI clocking strategies and synchronization'. Technically I'm
  2087. still at Chalmers, but the main part of my work is done at a very small
  2088. university in Trollhattan, some 70-80km to the north of Gothenburg.
  2089. Since my studies and research work are interleaved with tutoring (20%),
  2090. I don't expect to have finished my thesis until the turn of the century
  2091. (given that I'm allowed to continue, that is).
  2092.  
  2093. @{B}Hobbies@{0}
  2094. For the past 16 years programming has been my major hobby, but I also
  2095. read quite a lot of fiction (see below), play the trumpet in a big band
  2096. and cornet in a brass band. Last autumn ('95) I took up fencing, which
  2097. is even more interesting than I thought it would be. Try it!
  2098.  
  2099. @{B}Favourite movies and TV shows@{0}
  2100. I've never had cable TV, so I've not had the 'opportunity' to watch much
  2101. TV at all (we only have three channels on the air in Sweden).
  2102. A couple of favourites I could mention would be:
  2103.   Twin Peaks
  2104.   Winds of War (?) and the sequel War and Remembrance
  2105.   Red Dwarf
  2106. I do @{B}not@{0} like 'Hillstreet Blues', 'Baywatch' or 'Dallas', though
  2107. I must admit I watched the latter for years.
  2108.  
  2109. Regarding movies, I think I'm about average. I'm not one of those who
  2110. look down on the Hollywood productions, in fact most of my favourite
  2111. movies were indeed made there.
  2112. Some favourites are:
  2113.   Dances with Wolves
  2114.   Last Action Hero
  2115.   Prince of Thieves
  2116.   Star Wars
  2117.   Willow
  2118.   Beauty and the Beast (Disney)
  2119.   Braveheart
  2120.  
  2121. @{B}Favourite books@{0}
  2122. I've always read quite a lot of fiction of various kinds. I'm no speed
  2123. reader of any kind, though, but read purely for relaxation. Still, I
  2124. normally end up at about fifteen thousand pages per year.
  2125.  
  2126. The all time favourite authors/books are at the top in the categories
  2127. below. The rest are in no specific order.
  2128.  
  2129. Fantasy/Science fiction
  2130. @label WoT
  2131. Robert Jordan - The Wheel of Time
  2132.   This is without a doubt @{B}the@{0} best fantasy books ever.
  2133.   So far there are seven books in the series, totalling well over five
  2134.   thousand pages, and the story is not even getting close to the end.
  2135.   According to Mr Jordan himself:   'Some more books. Not many.'
  2136.   One of the more active newsgroups on Usenet is dedicated completely to
  2137.   the discussion of these books:  rec.arts.sf.written.robert-jordan
  2138.   That there is still a lot to discuss after several years says a lot
  2139.   about the complexity and depth of the plot...
  2140.   By the way, the reason for the name of my WWW/ftp site is in here. ;-)
  2141. Stephen Donaldson
  2142.   Really good author who writes both fantasy and science fiction.
  2143.   Most of his books are @{B}very@{0} dark, but 'Mordant's need' is good proof
  2144.   that he can write more cheerful stuff as well.
  2145. Melanie Rawn - Dragon Prince/Star
  2146.   A very good six book tale. Quite a bit different from any other
  2147.   fantasy I've read.
  2148. Tad Williams - Memory, Sorrow and Thorn
  2149.   A very good four book series.
  2150. L E Modesitt
  2151.   I don't know what more he's written, but the first five books about
  2152.   the 'Recluse' world are very good.
  2153.  
  2154. Techno thriller
  2155. Tom Clancy
  2156.   Extremely good author. Everything he's written, apart from the recent
  2157.   'Op-center' books (which I don't believe he has actually written),
  2158.   is very good. A couple of movies starring among other Harrison Ford
  2159.   have been made from the books.
  2160.  
  2161. Horror
  2162. Dean R Koontz
  2163.   Most of the books are very good, but should perhaps not really be
  2164.   called horror.
  2165. Stephen King
  2166.   If I'd been able to come up with another category for the above, King
  2167.   would have been a clear first in horror. I've not read any of the
  2168.   earlier books (Carrie, Dead Zone etc), but most of the later ones
  2169.   are very good indeed.
  2170.  
  2171.  
  2172. @label "email"
  2173. @{B}Contact addresses@{0}
  2174. The email addresses are in order of preference. If a letter to the
  2175. first one bounces, try the second and so on.
  2176.  
  2177. Email:  rand@cd.chalmers.se
  2178.         johan@rand.thn.htu.se
  2179.         klockars@thn.htu.se
  2180.         johank@ce.chalmers.se
  2181.  
  2182. WWW:    http://rand.thn.htu.se
  2183.         (possibly with a /~johan at the end in the future)
  2184.  
  2185. Snail:  Johan Klockars
  2186.         Skaragatan 8d
  2187.         S-415 01 Gothenburg
  2188.         SWEDEN
  2189.  
  2190. Telephone:  +46 (0)31-844481
  2191.             +46 (0)520-475056 (work)
  2192. @endnode
  2193. @node "Frank Möhle"
  2194.  
  2195. @{B}Frank Möhle@{0}
  2196. No text supplied yet.
  2197.  
  2198. @endnode
  2199. @node "Howard Chu"
  2200.  
  2201. @{B}Howard Chu@{0}
  2202. No text supplied yet.
  2203.  
  2204. @endnode
  2205. @node "Klaus Pedersen"
  2206.  
  2207. @{B}Klaus Pedersen@{0}
  2208. No answer to my email yet.
  2209.  
  2210. @endnode
  2211. @node "Eero Tamminen"
  2212.  
  2213. @{B}Eero Tamminen@{b}
  2214. Look at my WWW page 'http://proffa.cc.tut.fi/%7Et150315/' for
  2215. information on what I have done besides help out a little with MGIF.
  2216.  
  2217. A couple of examples of what I have done in C:
  2218.  
  2219.   PUNSSi   Hi-rez two player game. A kind of a ball game ;-).
  2220.   GRAAVi   -"-. Two space ships duelling.
  2221.   Wyrms    -"-. The well-known worm game with bonuses etc.
  2222.  
  2223.   Clac     A programmer's function calculator. Cli and GEM versions.
  2224.   Grafix   A 'graphics made easy' library for GEM & X.
  2225.   XimgView
  2226.   XimgSnap
  2227.   Various Atari ports (mostly straight compilations) of unix stuff,
  2228.   among other Mutt Editor 3.5, X games...
  2229.  
  2230.  
  2231. @{B}Education and work@{b}
  2232. I'm at the Technical University of Tampere studying computers. At the
  2233. moment I haven't got any work experience, but I have programmed two
  2234. years in basic and two years in C.
  2235.  
  2236.  
  2237. @{B}Hobbies and intrests@{b}
  2238. My main hobbies are reading and programming. Occasionally I'll do
  2239. sports (cycling, badminton, table tennis, throwing a boomerang ;).
  2240. I'm also interested about cooking although I do it seldom.
  2241.  
  2242. My favorite wheather is a summer drizzle (I got hayfever, so I'm
  2243. a bit allergic to what sunshine cooks up on the fields <g>). I like
  2244. Jazz, Bach, Progressive rock etc. Some could describe my character
  2245. as a cynical romantic :-)))).
  2246.  
  2247.  
  2248. @{B}Favourite books, movies and TV series@{b}
  2249. Well, I don't look much TV but the list of my favorite authors / books
  2250. is long. Mostly the books are science fiction, but I read a bit of
  2251. Fantasy and mainstream too. Contrary to most of my friends I like short
  2252. stories and poems too. IMHO a 'serious' (sci-fi) book that doesn't give
  2253. a new view angle into some old, common or uncommon subject, isn't worth
  2254. much. Good sci-fi should also have humor, suspence etc. ingredients that
  2255. mark good literature.
  2256.  
  2257. Here are some of the authors I like and, in case I remember it,
  2258. the favorite book by them:
  2259.  
  2260.  
  2261. (@{B}Ladies@{b} first)
  2262. Ursula Le Guin          'The left hand of darkness'
  2263. Doris Lessing           'A man and two women' (non Sci-Fi)
  2264. Octavia Butler          'Xenogenesis'-trilogy
  2265. Sheri S. Tepper
  2266. Connie Willis
  2267. James Tiptree Jr.
  2268. Johanna Sinisalo        Short stories
  2269.  
  2270. Philip Farmer           'Strange relations' (short stories)
  2271. Philip K. Dick          Lots of books that makes you doubt reality...
  2272. Frederik Pohl           'Space Merchants', lots of others
  2273. John Sladek             Biting satire
  2274. Stanislaw Lem           thoughful satire
  2275. Harry Harrison          Space opera (got me into Sci-Fi)
  2276. Arthur C. Clarke        Realistic, near future sci-fi
  2277. Hal Clement, Fred Hoyle Realistic (hard) sci-fi
  2278. John Varley             'The persistance of Vision'
  2279. Douglas Adams           Has his own style of humor...
  2280. Bruce Sterling          'Globalhead' (short stories)
  2281. Robert Holdstock        Mythology
  2282. Ian Watson
  2283. David Brin
  2284. Clifford Simak
  2285. Alfred Bester
  2286. Orson Scott Card
  2287. John Brunner
  2288. Brian Aldiss
  2289. Kurt Vonnegut           'Slaughterhause 5'
  2290. Anthony Burgess
  2291. Terry Pratchet          Humorous fantasy
  2292. C. S. Lewis             Christian allegories (eg. 'Narnia' for children)
  2293. Isaac Asimov            Some good ones, most are too content-less
  2294. Ray Bradbury            Short horror / sci-fi stories
  2295. Roald Dahl              Short horror stories
  2296.  
  2297. + numerous other (not quite so well-known) sci-fi, techno-thriller,
  2298. detective story (Sara Paretsky) etc. writers.
  2299.  
  2300. And in case someone hasn't yet noticed that comics is an art form here's
  2301. a short list of my favorite european comics authors (in no particular
  2302. order):
  2303.  
  2304. Fred, Hugo Pratt (especially 'indian Summer' made in colloboration with
  2305. Milo Manara), Didier Comes (just look at the art), Joakim Pirinen,
  2306. Mezieres & Christin (sci-fi), Charlier & Giraud (western, under alias
  2307. 'Moebius' produces also sci-fi), Enki Bilal (sfi-fi & history), Neil
  2308. Gaiman (Sandman), Tardi, Tove Jansson (Moomin Trolls ;-), Franquin.
  2309.  
  2310. USA, Japan and South America also got some good ones...
  2311.  
  2312.     - Eero        t150315@cc.tut.fi
  2313.  
  2314. @endnode
  2315. @node "The Graphical User Interface"
  2316.  
  2317. @{B}The Graphical User Interface@{0}
  2318. I have not yet decided what more should go here.
  2319.  
  2320. Two short things regarding customization:
  2321.  
  2322. - MGIF does not give you any flying or windowed dialogs. That is
  2323.   entirely on purpose since not everyone likes the same type of
  2324.   handling. Install for example 'Let'em Fly' and 'mdial' instead and
  2325.   configure them however you want.
  2326.  
  2327. - Since there are, as far as I know, no external programs available
  2328.   that can give you menu shortcuts, MGIF uses a very simple to use
  2329.   scheme for that. Take a look at 'Shortcut file'.
  2330.  
  2331. @endnode
  2332. @node "File handling"
  2333.  
  2334. @{B}File handling@{0}
  2335. A file can be loaded into MGIF in two different ways. The first is by
  2336. giving the name on the command line, or by moving a file onto the MGIF
  2337. program icon. The second is to use the @{"'Load'" link "File menu" "Load file"} menu selection.
  2338.  
  2339. Whatever the method, there are a couple of things that decide how MGIF
  2340. loads the file and what it does with it afterwards.
  2341.  
  2342. The image is currently always loaded into the first buffer and the
  2343. rest of the buffers can be destroyed. If there is enough memory, the
  2344. other buffers are normally safe, though.
  2345.  
  2346. The @{"load dialog" link "Options menu" "Load"} handles all settings associated with image loading.
  2347.  
  2348. The most important selection is the file load mode:
  2349.  
  2350. Greyscale
  2351. Images are converted to greyscales directly upon loading and are stored
  2352. internally in that format only.
  2353.  
  2354. Mapped colour
  2355. Images are stored with their palette and original number of colours.
  2356. If the loaded image was a 24 bit one, for example a JPEG, it will be
  2357. quantized before it's stored.
  2358.  
  2359. True colour (24 bit)
  2360. The red, green and blue components of the loaded image are stored
  2361. separately in the first three buffers.
  2362.  
  2363. @endnode
  2364. @node "Display handling"
  2365.  
  2366. @{B}Display handling@{0}
  2367. To draw the current source image, use 'Draw source', and for the
  2368. current destination image, 'Draw destination'.
  2369.  
  2370. Most drawings that take a while can be interrupted by a press on the
  2371. left mouse button.
  2372.  
  2373. The @{"display dialog" link "Options menu" "Display"} handles all settings directly concerned with the
  2374. display. Parameters for the Floyd-Steinberg dithering are set in the
  2375. @{"F-S dialog" link "Options menu" "F-S"}.
  2376.  
  2377.  
  2378. Greyscale
  2379. A greyscale image is normally first drawn quickly and then improved
  2380. using Floyd-Steinberg error diffusion dithering.
  2381.  
  2382. When flicker mode is selected, a greyscale image is first drawn very
  2383. quickly using an @{"ordered dithering" link "Ordered dither"} algorithm and then redrawn using
  2384. Floyd-Steinberg error diffusion dithering.
  2385.  
  2386.  
  2387. Mapped colour
  2388. If @{"ordered dither" link "Ordered dither"} is selected, MGIF will do what it can to make
  2389. the image appear nicely on screen. When fewer colours are available for
  2390. the screen than is used in the image and the resolution is low (as on an
  2391. ST/E), this will normally not look good.
  2392.  
  2393. If @{"ordered dither" link "Ordered dither"} is @{B}not@{0} selected, MGIF will not do anything special if
  2394. there are fewer screen colours than image ones and the display is likely
  2395. to look very bad indeed.
  2396.  
  2397.  
  2398. True colour (24 bit)
  2399. If you are in the Falcon true colour mode and have an image with red,
  2400. green and blue components in the first three buffers (for example after
  2401. having loaded an image in 24 bit mode), you can draw the image in full
  2402. colour using 'Draw RGB'. The image will first be drawn quickly and then
  2403. improved using Floyd-Steinberg error diffusion dithering for each of the
  2404. RGB components.
  2405.  
  2406. @endnode
  2407. @node "Command line switches"
  2408.  
  2409. @{B}Command line switches@{0}
  2410. A lot of things can be set up using switches, short text commands, given
  2411. on the command line when MGIF is started. The switches can be given in
  2412. a number of other ways as well, as described under 'Configuration'.
  2413. A good many things that can be set via the switches can also be
  2414. controlled from within the GUI.
  2415.  
  2416. A short summary of the most important switches
  2417.  
  2418. All available switches are given below. Some are described in more than
  2419. one place.
  2420.  
  2421. @{B}Memory related@{0}
  2422. -alt       Use alternate memory for buffers.
  2423.            Alternate memory is normally TT RAM or virtual memory.
  2424.              This can be changed from the startup dialog.
  2425. -l n       Set the amount of memory that MGIF leaves to TOS on startup.
  2426.            This value (in kbyte) is simply subtracted from the available
  2427.            amount before showing the value in the startup dialog.
  2428. -p0 n      Set the amount of memory (in kbyte) used for the first buffer
  2429.            explicitly.
  2430. -p1 n      Same as above, but for the second buffer.
  2431. -pm n      Set the maximum amount of memory (in kbyte) to be used. This
  2432.            is the value that will be shown in the startup dialog.
  2433.              This can be changed from the startup dialog.
  2434.  
  2435. @{B}Buffer related@{0}
  2436. -CC        Tell MGIF to reserve three source buffers. This is needed for
  2437.            24 bit colour images. Also sets load mode to 24 bit colour.
  2438. -px        Tell MGIF to use a single buffer, or rather no destination
  2439.            buffer since three soure buffers will be allocated if 24 bit
  2440.            colour mode is selected.
  2441.              This can be changed from the startup dialog.
  2442.  
  2443. @{B}Image load related@{0}
  2444. -aco       Tell MGIF to do aspect correction on load.
  2445.              This can be changed from the 'options/load...' dialog.
  2446. -C         Set load mode to mapped colour.
  2447.              This can be changed from the 'options/load...' dialog.
  2448. -CC        Set load mode to 24 bit colour.
  2449.              This can be changed from the 'options/load...' dialog.
  2450. -dog       Tell MGIF to put a greyscale version of a loaded image into
  2451.            the last buffer.
  2452.              This can be changed from the 'options/load...' dialog.
  2453. -fit       Tell MGIF to size images to fit on screen on load.
  2454.              This can be changed from the 'options/load...' dialog.
  2455. -g         Set load mode to greyscales.
  2456.              This can be changed from the 'options/load...' dialog.
  2457. -gf2       Tell MGIF to always use the newer GIF decoder. This may
  2458.            improve loading speed 5-10%. Perhaps this should be the
  2459.            default, but that has not been decided yet (950226).
  2460. -jpd       Tell MGIF to use the DSP JPEG loader JPEGD from Brainstorm
  2461.            if it's available. Due to possible legal problems the code
  2462.            for this is not included in any distributed versions.
  2463. -shw       Tell MGIF to show an image directly after loading it.
  2464.              This can be changed from the 'options/load...' dialog.
  2465.  
  2466. @{B}Screen related@{0}
  2467. -asp       Set aspect ratio in percent. This is the number of vertical
  2468.            pixels that are eqivalent in length to 100 horizontal ones.
  2469.              This can be changed from the 'options/display...' dialog.
  2470. -ttg       Tell MGIF to switch to TT grey mode.
  2471.  
  2472. @label "interface options"
  2473. @{B}Interface related@{0}
  2474. -dsu       Tell MGIF to skip the startup dialog.
  2475. -s         Tell MGIF to wait on a keypress before returning.
  2476. -w         Tell MGIF to wait on a keypress on startup.
  2477. -bsy       Tell MGIF to display the busy bee cursor when appropriate.
  2478.  
  2479. @{B}Display related@{0}
  2480. -f         Turn on flicker display.
  2481.              This can be changed from the 'options/display...' dialog.
  2482. -mfl       Tell MGIF to try to achieve stable flicker draw even when
  2483.            running under multitasking. Currently uses supervisor mode.
  2484. -mvx n     Set the movement speed in percent of normal for scrolling
  2485. -mvy n     view. Values below 100 will not work correctly.
  2486.            X and Y axis movement can be controlled individually.
  2487. -scr       Turn on scrollable normal view.
  2488.              This can be changed from the 'options/display...' dialog.
  2489. -sng       Tell MGIF to use the normal system screen for drawing.
  2490.            If this is not selected another screen is allocated.
  2491.              This can be changed from the startup dialog.
  2492. -vdi       Tell MGIF to use only the VDI for drawing.
  2493.            Only works for an 8 bit graphics mode (256 colours/greys).
  2494.            Do @{B}not@{0} use this if you don't have a graphics card, it will
  2495.            be a @{B}lot@{0} slower.
  2496.            If -vdq works on your card, use it instead. It's much faster.
  2497. -vdq       Tell MGIF to use only the VDI for drawing, but cheat a bit.
  2498.            This may or may not work depending on the graphics card used.
  2499.            If you don't get a correct display, use -vdi instead.
  2500.  
  2501. @label "Config files"
  2502. @{B}Configuration file related@{0}
  2503. -opt dir   Load the configuration files from a specified directory.
  2504. @label "options file"
  2505. -o fname   Load another options file than the default 'MGIF.OPT'.
  2506. @label "key file"
  2507. -key fname Load another shortcut file than the default MGIF.KEY.
  2508. @label "undo file"
  2509. -u fname   Set the UNDO file. Without this, the UNDO switch below will
  2510.            not work.
  2511. -d fname   Load another dither file than the default MGIF.DTT.
  2512.            Both .DIT and .DTT files are possible.
  2513. -exe fname Load another flicker code file than the default MGIF_FL.EXE.
  2514.  
  2515. @label "startup options"
  2516. @{B}Startup mode related@{0}
  2517. -fl        Just show the .FL files given on the command line.
  2518. -gem       Run MGIF as a GEM program.
  2519. -m         Do montage with .FL pictures. -fl must be used as well.
  2520. -ss        Tell MGIF to do a @{"slide-show" link "Slide-show"} of the
  2521.            images on the command line.
  2522.            The images are displayed once and at maximum speed.
  2523. -ssf fname Use wildcards from the given file for slide-show. Separate
  2524.            timings may be used.
  2525. -ssl       Tell MGIF to loop a slide-show indefinitely.
  2526. -ssr       Tell MGIF to randomize the slide-show.
  2527. -sst n     Tell MGIF to do a timed slide-show as above, but with a given
  2528.            minimum time of n seconds between the displayed images.
  2529. -tos       Run MGIF as a TOS/TTP program.
  2530.  
  2531. @{B}General setup@{0}
  2532. -aft       Tell MGIF to draw the destination image after successfully
  2533.            applying an image processing operation.
  2534.              This can be changed from the 'options/display...' dialog.
  2535. -col n     Set the number of colours used for JPEG load and quantize.
  2536.              This can be changed from the 'options/quantize...' dialog.
  2537. @label "handshake"
  2538. -dhs       Tell MGIF to use handshaking for all communication with the
  2539.            DSP chip in the Falcon030.
  2540.            This is turned on in the supplied MGIF.OPT, but since the DSP
  2541.            operations are faster without it, try turning it off.
  2542.            For most machines everything should be fine without it.
  2543. -dpi n     Set the printer dpi used for the IMG save.
  2544.              This can be changed from the dialog that pops up when you
  2545.              save in IMG format.
  2546. -dsp       Tell MGIF to use the DSP in the Falcon030 whenever possible.
  2547. -fss       Turn on F-S dithering for IMG save.
  2548.              This can be changed from the dialog that pops up when you
  2549.              save in IMG format.
  2550. -n         Turn off dithering for colour quantize and JPEG load.
  2551.              This can be changed from the 'options/quantize...' dialog.
  2552. -smt       Turn on @{"smooth" link "Smooth scale/rotate"} scaling/rotation.
  2553.              This can be changed in the dialogs of affected operations.
  2554. -svd       Set default buffer to save to be the destination one.
  2555. -udo       Tell MGIF to save the destination buffer before each operation
  2556.            that may change it. 'UNDO' is enabled in the menu.
  2557.            The -u switch above must be used as well.
  2558.              This can be changed from the 'options/misc...' dialog.
  2559. -x         Turn off two pass colour quantize.
  2560.              This can be changed from the 'options/quantize...' dialog.
  2561. -xx        Turn on two pass colour quantize.
  2562.              This can be changed from the 'options/quantize...' dialog.
  2563.  
  2564. @{B}Various of little use@{0}
  2565. -c         Tell MGIF to not copy from logical to physical screen.
  2566.            Very useful if MGIF is run in text mode from a window, such
  2567.            as under MiNT/toswin.
  2568. -h         Tell MGIF to show a help screen.
  2569. -i         Only inquire about file information. No loading is done.
  2570. -pp        Tell MGIF to optimize buffer allocations for image
  2571.            processsing. Does nothing much.
  2572. -v         Turn on verbose mode.
  2573.            Of some small use for text mode, possibly.
  2574. -vers      Tell MGIF to show version information only.
  2575.  
  2576. @{B}Test related@{0} (only given for completeness)
  2577. -aln       Tell MGIF to do word alignment of buffers even on '030s.
  2578. -dbg       Tell MGIF to write debugging information to the screen.
  2579. -ST        Tell MGIF to use colours on a Falcon as if it were an ST.
  2580.  
  2581. @{B}Unimplemented or out of use@{0} (only given for completeness)
  2582. -b         Tell MGIF to run in batch mode.
  2583.              This is not yet implemented.
  2584. -N         Tell MGIF to use NTSC colour equations.
  2585.              This is not used any longer.
  2586. -p         Use a MiNT pipe for command input instead of the usual
  2587.            text mdoe interaction.
  2588.              This is not yet implemented.
  2589. @endnode
  2590. @node "Distribution"
  2591.  
  2592. @{B}Distribution@{0}
  2593. MGIF is FreeWare, not PublicDomain, which means that the @{"author" link "Johan Klockars"} retains
  2594. all copyrights. See the end of this text for main distribution channels.
  2595.  
  2596. - No distribution for profit is allowed.
  2597.   Software distribution centers operating more or less without profit,
  2598.   like most PD libraries, are allowed to treat MGIF as they do any
  2599.   other FreeWare software they carry.
  2600.   For CDROM distribution, contact the @{"author" link "Johan Klockars"}. There is not likely to be
  2601.   any problem.
  2602. - Modification of or use of MGIF code in other programs without the
  2603.   explicit permission of the @{"author" link "Johan Klockars"} is forbidden. Such permission @{B}will@{0}
  2604.   be given for other FreeWare (or similar) programs when asked for.
  2605.   Naturally the origin of the code should be mentioned in the program
  2606.   and documentation.
  2607. - For inclusion of MGIF code in ShareWare or commercial software,
  2608.   something surely can be arranged. The parts of the code that were
  2609.   written by other people may pose a problem of course, but that will
  2610.   be handled if the need arises.
  2611. - MGIF versions marked as beta releases in the 'About' dialog should not
  2612.   be distributed anywhere.
  2613.  
  2614. New versions of MGIF will in the future appear more often. There will
  2615. certainly not be another two and a half year gap. On the other hand
  2616. there will never be another update as major as v5.
  2617. From time to time the latest MGIF version will be uploaded to the most
  2618. common ftp sites on the internet, from where it can be spread according
  2619. to the rules above. There may be uploads to some BBSs as well.
  2620.  
  2621. As has been the case for about a year now, the very latest versions of
  2622. MGIF will always be available from the WWW/ftp site given below.
  2623. If a release there is marked in the 'About MGIF' box as a beta version,
  2624. it should not be widely distributed. There is most often a good reason
  2625. for the beta status.
  2626.  
  2627. The main MGIF ftp site is:
  2628.   rand.thn.htu.se   (@{"The Dragon Reborn" link "Johan Klockars" "WoT"})
  2629.  
  2630. Since 950719 the preferred way to fetch MGIF is via the newly installed
  2631. WWW site at the same address:
  2632.   http://rand.thn.htu.se
  2633.  
  2634. If you can't find a pointer to MGIF on the top level HTML page (I might
  2635. decide to change that), just append /~johan at the end of the address.
  2636.  
  2637. If you don't have internet access, but still want to get hold of the
  2638. very latest version, take a look at 'Registration'.
  2639.  
  2640. @endnode
  2641. @node "Slide-show"
  2642.  
  2643. @{B}Slide-show@{0}
  2644. Apart from a simple, wildcard driven, sequential display of images given
  2645. from a command line (-ss), MGIF can also do the following.
  2646.  
  2647. - Display all images for a given minimum time (-sst n)
  2648. - Loop slide-show indefinitely (-ssl).
  2649. - Show images in random order (-ssr).
  2650. - Read wildcards with separate timing data from a file (-ssf fname).
  2651.  
  2652. Most of the above are very straight forward, but some more information
  2653. can be found where the @{"switches" link "Command line switches" "startup options"} are described.
  2654. There are no restrictions on the combinations of switches other than that
  2655. a random slide-show is always indefinite.
  2656.  
  2657. Pressing 'q' or ESC will quit the slide show as soon as possible. Any
  2658. other key will advance to the next image.
  2659.  
  2660. @{B}Slide-show file@{0}
  2661. A slide show file should consists of lines with a time (in seconds) and
  2662. a wildcard, for example as below.
  2663.  
  2664. 5   h:\gifs\p*.gif
  2665. 2   c:\silvghst.tga
  2666. 10  l:\pictures\bird*.*
  2667.  
  2668. Note that when a slide-show file is used, no wildcards from the command
  2669. line are processed.
  2670.  
  2671. @endnode
  2672. @node "Using MGIF"
  2673.  
  2674. @{B}Using MGIF@{0}
  2675. A hypertext manual like this can easily cover a lot of topics without
  2676. making it apparent how to find the relevant texts. To help out with that
  2677. this section was written.
  2678. Feedback from the users will determine what goes here in the future.
  2679.  
  2680. - Image processing operations
  2681. - Slide-show
  2682. - General tips
  2683.  
  2684. @endnode
  2685. @node "General tips"
  2686.  
  2687. @{B}General tips@{0}
  2688.  
  2689. Various
  2690. - GIF images are often dithered. If you want to manipulate one in
  2691.   greyscales or 24 bit colour, it's almost always a good idea to apply
  2692.   some kind of smoothing to it first.
  2693.   The ordinary blur works rather well, but has a tendency to make the
  2694.   image look a bit too unfocused. A better idea is to use a @{"convolution" link "Convolutions"}
  2695.   filter such as:
  2696.  
  2697.        1  1  1
  2698.        1  8  1                    (Blur has a '1' as the middle value)
  2699.        1  1  1    / 16
  2700.  
  2701.   This is still a kind of blur, but the middle pixel has been weighted
  2702.   so that it's relatively more important.
  2703.  
  2704. Some useful switches
  2705. -dsu   If you never change anything in the startup dialog it can be
  2706.        skipped completely.
  2707. -svd   If you're doing image manipulation it's often a good idea to
  2708.        have MGIF default to saving the destination buffer.
  2709.  
  2710. @endnode
  2711. @node "Registration"
  2712.  
  2713. @{B}Registering MGIF@{0}
  2714. MGIFv5 represents a lot of work (well over half a year full time on my
  2715. part alone) over several years, and many users have told me how much
  2716. they appreciate the program. With the latest release MGIF is still
  2717. FreeWare, but I would like you to register the program to give me an
  2718. idea of how many people are actually using it.
  2719.  
  2720. @{"Send me" link "Johan Klockars" "email"} your details on a postcard, in a letter/email, give me feedback,
  2721. send candy, flowers, money (any currency), floppy disks, hardware... ;-)
  2722. Please, register your details with me.
  2723.  
  2724. Users in the UK can register with Denesh Bhabuta. A minimum contribution
  2725. of 6 Pounds sterling is suggested, to register. Please, make cheques,
  2726. Eurocheques and postal orders payable to Denesh Bhabuta and send to:
  2727.  
  2728. CyberSTrider
  2729. 203 Parr Lane
  2730. Unsworth
  2731. Bury
  2732. Lancashire
  2733. BL9 8JW
  2734. UK
  2735.  
  2736. Denesh will then send you a disk with the latest version of MGIF, along
  2737. with a selection of other programs he supports. Upgrades are also
  2738. available through Denesh, by sending him an SSAE and a blank formatted
  2739. floppy disk.
  2740.  
  2741. @{B}Do the right thing... Register.@{0}
  2742.  
  2743. @endnode
  2744. @node "What's new?"
  2745.  
  2746. @{B}Changes/improvements in MGIF 5.10@{0}
  2747.  
  2748. @{B}Changes/improvements in MGIF 5.01@{0}
  2749. - Due to special code for the Falcon030 DSP, some operations have been
  2750.   speeded up @{B}very@{0} much:
  2751.     convolution filtering (10x)
  2752.     median filtering (5x)
  2753.   Please, read about @{"handshaking" link "Command line switches" "handshake"} for optimum performance.
  2754.  
  2755. @endnode
  2756. @node "Smooth scale/rotate"
  2757.  
  2758. @{B}Smooth scaling and rotation@{0}
  2759. For some image processing operations, MGIF is capable of producing much
  2760. better results if you're prepared to wait a little. It does this by
  2761. interpolating between and/or averaging over pixels.
  2762.  
  2763. This process needs one or more multiplications per pixel, so it can be
  2764. quite slow. The results are usually well worth it, though.
  2765.  
  2766. @endnode
  2767.